Welding process parameter recommendation and defect prediction system
The welding process parameter recommendation and defect prediction system, which integrates multi-source data collaborative feature fusion and combines CNN-LSTM and ResNet-Attention models, solves the problems of low efficiency in determining welding process parameters and low accuracy in defect prediction, and achieves efficient process parameter optimization and quality control.
Patent Information
- Application Number
- CN202610104507.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-15
AI Technical Summary
The existing welding process parameters are inefficient to determine, have poor parameter consistency, are difficult to adapt to new materials, have low defect prediction accuracy, and lack closed-loop control for parameter optimization and defect prevention.
A welding process parameter recommendation and defect prediction system employing multi-source data collaborative feature fusion includes modules for data acquisition, preprocessing, feature extraction and fusion, parameter recommendation, and defect prediction. Combining CNN-LSTM and ResNet-Attention models, it achieves process parameter optimization and defect prediction through collaborative feature vectors.
It improves the characterization capability of welding quality, significantly enhances the accuracy of defect prediction, reduces rework rate, realizes precise recommendation of process parameters and closed-loop quality control, and is adaptable to various welding scenarios.
Smart Images

Figure CN122046211A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of welding process optimization and defect detection technology, specifically to a welding process parameter recommendation and defect prediction system. Background Technology
[0002] Welding is widely used in machinery, automotive, aerospace and other fields. It is an indispensable key processing technology in the manufacturing industry. The rationality of the welding process parameter settings has a decisive impact on the weld formation, internal quality and defects, and directly determines the welding quality. However, defects such as porosity, cracks and lack of fusion are prone to occur during the welding process, which seriously affect the performance and service life of the workpiece. At present, the determination of welding process parameters is still dominated by the experience of operators. The parameters are optimized through the cycle of "trial welding-inspection-adjustment". This has problems such as low efficiency, poor parameter consistency, high parameter deviation rate of the same batch of workpieces, and difficulty in adapting to the welding requirements of new materials such as high-strength aluminum alloys and titanium alloys.
[0003] In terms of defect prediction, existing technologies mostly employ a single model: CNNs extract features from molten pool images for defect identification, but they cannot capture the dynamic changes of process parameters over time, such as the correlation between current fluctuations and cracks; LSTMs analyze time-series parameters, but they lack the ability to perceive abnormal molten pool morphology, such as surface depressions corresponding to porosity. The defect prediction accuracy of these single models is generally below 90%, and they lack a collaborative mechanism between parameter recommendation and defect prediction, failing to achieve closed-loop control of "parameter optimization - defect prevention"; while ResNet models can solve the gradient vanishing problem in deep networks and effectively extract complex image features, they do not combine attention mechanisms to focus on key defect areas; and while CNN-LSTM models can handle time-series data and local features, they have shortcomings in multi-source data collaborative modeling and global feature fusion. Therefore, a welding process parameter recommendation and defect prediction system is proposed. Summary of the Invention
[0004] To address the technical problems existing in the prior art, the present invention provides a welding process parameter recommendation and defect prediction system.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a welding process parameter recommendation and defect prediction system, the prediction system comprising a data acquisition module, a data preprocessing module, a feature extraction module, a parameter recommendation module, a defect prediction module, and a visualization interaction module, wherein the output end of the data acquisition module is connected to the input end of the feature extraction module, the output ends of the feature extraction module and the feature processing module are connected to the input end of the feature extraction module, the output end of the feature extraction module is connected to the input ends of the parameter recommendation module and the defect prediction module, and the output ends of the parameter recommendation module and the defect prediction module are connected to the input end of the visualization interaction module;
[0006] The data acquisition module is used to collect multi-source heterogeneous data during the welding process; the data preprocessing module performs standardization processing on the collected multi-source heterogeneous data; the feature extraction and fusion module is used to extract features from the multi-source heterogeneous data and perform feature fusion; the parameter recommendation module outputs the optimal process parameters based on the collaborative feature vector and workpiece information; the defect prediction module predicts the defect type and occurrence probability based on the collaborative feature vector; and the visualization interaction module realizes human-computer interaction and provides visualization display.
[0007] Preferably, the multi-source heterogeneous data collected in the data acquisition module includes time-series process parameter data, welding process image data, and historical welding data;
[0008] The timing process parameter data includes welding current, arc voltage, welding speed, and shielding gas flow rate; the sampling frequency is 100-500Hz, the step size of multi-source heterogeneous data is 100-200 (corresponding to 2-5 seconds), the number of samples is 100-200, the ROI area of the image accounts for 30%-50% of the original image, and the historical welding data includes samples of low carbon steel Q235, stainless steel 304, and aluminum alloy 6061.
[0009] The image resolution of the welding process image data is ≥1920×1080, the frame rate is ≥30fps, and 1 frame of image corresponds to every 5 time steps.
[0010] Historical welding data includes process parameters, defect detection results, and workpiece information, with a data sample size of ≥5000 sets.
[0011] Preferably, the data preprocessing module uses the Daubechies-4 wavelet basis to perform denoising, linear interpolation completion, and maximum-minimum normalization on the time-series process parameter data;
[0012] CLAHE was used to enhance the images in the welding process image data. The CLAHE-enhanced images were then processed by 3×3 convolution kernel Gaussian filtering to eliminate noise. Then, Otsu's method was used to perform unsupervised automatic thresholding segmentation on the denoised images. From the segmented images with clear foreground and background boundaries, ROI sub-images containing the complete target were accurately cropped, irrelevant background interference was removed, and the cropped ROI images were normalized and scaled to a size of 224×224 pixels.
[0013] Adopt 3 The criteria remove abnormal samples from historical welding data and construct a structured relational database of "process parameters - workpiece information - defect results".
[0014] Preferably, the feature extraction and fusion module consists of a CNN-LSTM and ResNet-Attention collaborative model, including a CNN-LSTM sub-model, a ResNet-Attention sub-model, and a feature fusion unit;
[0015] The CNN-LSTM sub-model consists of three convolutional layers (layer 1 with 3×1 / 32 kernels, layer 2 with 5×1 / 64 kernels, and layer 3 with 3×1 / 128 kernels) and two LSTM layers. Each convolutional layer is followed by a ReLU activation function, a batch normalization layer, and a dropout layer (with a dropout probability of 0.2). Each LSTM layer has 256 hidden units. Dropout layers (with a dropout probability of 0.2) and recurrent dropout layers (with a recurrent dropout probability of 0.1) are configured between layers to enhance the model's generalization ability. Through the synergistic effect of the three convolutional layers and the two LSTM layers, the output is a temporal feature vector with a dimension of 256. ;
[0016] The ResNet-Attention sub-model uses ResNet50 as its backbone network and adopts the residual block groups from conv1_x to conv5_x as its basic feature extraction architecture. At the feature output of the conv5_x residual block group, SEBlock (channel compression ratio of 16) and CBAM (convolutional block attention module, using 1×1 convolutional kernels to achieve cross-channel feature fusion) are integrated sequentially. Through the attention mechanism, adaptive feature enhancement and redundancy information suppression are achieved, and the output is a spatial feature vector with a dimension of 256. ;
[0017] The feature fusion unit maps and transforms the 512-dimensional input features through a fully connected layer, outputting a 2-dimensional feature vector. Then, it calculates the weight coefficients of the feature vector using the Softmax function. These weight coefficients are then used to perform weighted fusion on the 256-dimensional collaborative feature vectors in the original feature space after L2 normalization, resulting in a weighted 256-dimensional collaborative feature vector. .
[0018] Preferably, the convolutional layers of the CNN-LSTM sub-model adopt the "same" mode boundary, the first LSTM layer returns a sequence, and the second LSTM layer does not return a sequence. After CNN spatial feature extraction and LSTM temporal feature aggregation, the output is a two-dimensional temporal feature vector with dimensions of (number of samples, 256), corresponding to the dynamic correlation features of welding parameters.
[0019] Preferably, the ResNet50 of the ResNet-Attention sub-model includes four residual block groups: conv2_x with 3 residual blocks, conv3_x with 4 residual blocks, conv4_x with 6 residual blocks, and conv5_x with 3 residual blocks. First, conv1_x is performed as a 7×7 convolution (64 kernels, stride 2), followed by 3×3 max pooling (stride 2).
[0020] After hierarchical feature extraction and feature weighting optimization by the Attention mechanism of the ResNet50 backbone network, the output is a two-dimensional spatial feature vector with dimensions of (number of samples, 256), corresponding to the melt pool defect association features.
[0021] Preferably, the weight calculation of the feature fusion unit satisfies Linear fusion calculation is performed based on preset weights to obtain the original collaborative feature vector, ensuring adaptive fusion of temporal and spatial features. The fusion formula is as follows:
[0022] ;
[0023] In the formula, For collaborative feature vectors, For time series feature vectors, For spatial feature vectors;
[0024] The obtained collaborative feature vectors are subjected to L2 normalization. By calculating the L2 norm of the collaborative feature vectors and normalizing and scaling each element of the vector, the collaborative feature vectors are mapped onto the unit hypersphere, eliminating the fusion bias caused by the difference in numerical scale between the two types of features.
[0025] Preferably, the parameter recommendation module takes the collaborative feature vector and the 10-dimensional one-hot encoded workpiece information as input, processes them through a 3-layer fully connected network (128 / 64 / 32 nodes, ReLU+dropout=0.2) and a genetic algorithm, and outputs the optimal process parameters with an error ≤5%. The objective function of the genetic algorithm is:
[0026] ;
[0027] Where D is the melting depth compliance rate, H is the excess height compliance rate, and R is the width-to-depth ratio compliance rate;
[0028] The parameters of the genetic algorithm are: population size of 50, number of iterations of 30, crossover probability of 0.8, and mutation probability of 0.1.
[0029] The constraints of the genetic algorithm are: welding current ∈ [80,500]A, arc voltage ∈ [15,50]V, welding speed ∈ [5,50]mm / s, shielding gas flow rate ∈ [5,25]L / min, and parameter accuracies of ±1A, ±0.1V, ±0.1mm / s, and ±0.1L / min, respectively.
[0030] Preferably, the defect prediction module takes the collaborative feature vector as input, processes it through a 2-layer fully connected network (128 / 64 nodes, ReLU+dropout=0.2) and Sigmoid, and outputs the probabilities of three types of defects: porosity, cracks, and lack of fusion, with an accuracy of ≥96%; it supports custom thresholds, and triggers an audible and visual warning of 2kHz audio and a red flashing light when the threshold is exceeded;
[0031] The prediction results have an accuracy of ≥95% and a recall of ≥94%, with a default warning threshold of 80%.
[0032] Preferably, the visualization interaction module is developed based on Vue.js or PyQt5, supports Web / desktop display (parameter comparison curve, defect heatmap), supports manual adjustment within ±10% range and log recording (for incremental model learning), the log records include adjustment time, parameters before and after adjustment, operator ID, and the model's fully connected layer weights are updated every 1000 sets of new data.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] 1. This invention features high accuracy in multi-source feature fusion. It enhances defect region features through SE-CBAM hybrid attention and combines temporal-spatial weight adaptive allocation with collaborative feature vectors to improve the representation ability of welding quality. This results in improved defect prediction accuracy compared to a single CNN model. Furthermore, it uses a collaborative modeling method to clarify the layer structure, attention mechanism parameters, and feature fusion of sub-models, thereby optimizing process parameters and controlling quality during the welding process. This significantly improves defect prediction accuracy and establishes a collaborative mechanism between parameter recommendation and defect prediction, forming a closed-loop quality control.
[0035] 2. The parameter recommendation accuracy of this invention is excellent: By combining a fully connected network and a genetic algorithm for global optimization, the process parameter recommendation error is ≤5%, and the compliance rate of melt depth, residual height, and width-to-depth ratio are all improved, reducing the rework rate caused by improper parameters; the timing process parameters and melt pool image data are deeply integrated to extract complementary features.
[0036] 3. Wide applicability of the invention: The software adopts a modular design, supports individual updates of the model layer, and is compatible with various welding scenarios such as electric arc welding, laser welding, and argon arc welding. The defect threshold and parameter constraint range can be customized according to user needs. Attached Figure Description
[0037] Figure 1 This is a block diagram of the prediction system structure of the present invention;
[0038] Figure 2 This is a schematic diagram of the CNN-LSTM and ResNet-Attention collaborative model of the present invention. Detailed Implementation
[0039] The present invention will be further described below with reference to the accompanying drawings and embodiments, which illustrate the above and other technical features and advantages of the present invention. However, the following embodiments are merely preferred embodiments of the present invention and are not exhaustive.
[0040] Example 1:
[0041] like Figure 1-2 As shown, the present invention provides a welding process parameter recommendation and defect prediction system. The prediction system includes a data acquisition module, a data preprocessing module, a feature extraction module, a parameter recommendation module, a defect prediction module, and a visualization interaction module. The output end of the data acquisition module is connected to the input end of the feature extraction module, the output ends of the feature extraction module and the feature processing module are connected to the input end of the feature extraction module, the output end of the feature extraction module is connected to the input ends of the parameter recommendation module and the defect prediction module, and the output ends of the parameter recommendation module and the defect prediction module are connected to the input end of the visualization interaction module.
[0042] The data acquisition module is used to collect multi-source heterogeneous data during the welding process; the data preprocessing module standardizes the collected multi-source heterogeneous data; the feature extraction and fusion module extracts features from the multi-source heterogeneous data and performs feature fusion; the parameter recommendation module outputs the optimal process parameters based on collaborative feature vectors and workpiece information; the defect prediction module predicts the defect type and probability of occurrence based on collaborative feature vectors; and the visualization and interaction module realizes human-computer interaction and provides visualization display.
[0043] In this embodiment, multi-source heterogeneous data from the welding process is collected through a data acquisition module to ensure the timeliness and completeness of the data. Specifically:
[0044] Timing process parameter data: Using a current sensor with an accuracy of ±0.5%, a voltage sensor with an accuracy of ±0.2%, and an incremental encoder with a resolution of 1000 lines, four types of parameters—welding current, arc voltage, welding speed, and shielding gas flow rate—are simultaneously acquired at a sampling frequency of 100-500Hz. The time step of a single data set is set to 100-200, corresponding to a welding process of 2-5 seconds. The data dimension is (number of samples, time step, 4), with 100-200 samples. The ROI area of the image occupies 30%-50% of the original image. Historical welding data includes samples of low carbon steel Q235, stainless steel 304, and aluminum alloy 6061.
[0045] Welding process image data: A high-speed industrial camera with a resolution of ≥1920×1080 and a frame rate of ≥30fps is used to acquire images of the molten pool and arc area with a near-infrared filter with a wavelength of 800-1000nm. Every 5 time steps of the time series data correspond to 1 frame of image to ensure time alignment between time series and image data.
[0046] Historical welding data: Collect at least 5,000 sets of historical samples, including process parameter combinations, weld quality inspection results, such as defect types (porosity / cracks / lack of fusion) and defect levels (I-IV) in X-ray flaw detection reports, as well as basic workpiece information (material: low carbon steel Q235 / stainless steel 304 / aluminum alloy 6061; thickness: 3-20mm; bevel type: I-type / V-type / U-type).
[0047] In this embodiment, the collected data is standardized using a data preprocessing module to provide high-quality data for the model input. Specifically:
[0048] 1. Processing of timing process parameters:
[0049] a. Denoising: The time series signal is denominated by wavelet transform using the Daubechies-4 wavelet basis with 3-level decomposition to filter out high-frequency noise with sensor frequency >1kHz.
[0050] Existing denoising techniques involve performing N-level wavelet decomposition on the original time-series signal, identifying noise components in the high-frequency detail components, removing noise through threshold processing, and reconstructing the processed high-frequency and low-frequency components to obtain the denoised signal. Among these, the number of decomposition levels N, the noise judgment criteria, and the threshold selection are the core adjustable parameters of the existing technology. There are no fixed values, and they need to be adapted according to the specific signal scenario.
[0051] This application modifies the welding timing data by fixing a 3-layer decomposition, differentiating threshold processing, and clearly adapting to noise frequencies, thus avoiding incomplete noise filtering: the 3-layer decomposition accurately covers the noise frequency range of the welding scene, and the hard threshold processing completely eliminates high-frequency interference; it prevents distortion of effective signals: the soft threshold processing retains weak abrupt signals in cD3 (such as sudden current surges, which are related to crack formation), avoiding the loss of key features; and it improves engineering reproducibility: by fixing the number of decomposition layers and the threshold calculation method, it solves the problem of unstable denoising effect caused by adjustable parameters in the existing technology.
[0052] b. Completion: For missing data caused by packet loss during transmission, linear interpolation is used for completion. The completion formula is as follows:
[0053] );
[0054] In the formula, For the missing time series parameter values to be filled, The parameter value is from the previous time step. The parameter value for the next moment. for Corresponding timestamp, for Corresponding timestamp, for Corresponding timestamp;
[0055] c. Normalization: Max-min normalization is used to map the data to the [0,1] interval, outputting a standardized time series parameter sequence with dimensions (number of samples, time step, 4). The normalization formula is:
[0056] ;
[0057] In the formula, These are the normalized standard parameter values. These are the original sampled values. The minimum value among the sampled values. The maximum value among the sampled values;
[0058] Based on the statistical results of 5,000 sets of historical welding data, the calculation benchmark for normalization is clearly defined as "the maximum / minimum value of parameters under a single material and thickness specification". The range of welding parameters varies greatly for different materials and thicknesses. For example, the welding current for low carbon steel Q235 is usually 80-300A, while that for aluminum alloy 6061 is usually 150-500A. Grouping and statistically analyzing extreme values can improve the accuracy of normalization. This is a key adaptation modification for welding scenarios with multiple materials and specifications, while existing general technologies usually do not distinguish the data grouping dimension.
[0059] 2. Image data processing during the welding process:
[0060] a. Enhancement: The contrast of the melt pool region is improved by using a contrast-limited adaptive histogram equalization parameter of (CLAHE, clipLimit=2.0, gridSize=(8,8)).
[0061] b. Denoising: Image noise is suppressed by using a 3×3 Gaussian filter with a standard deviation σ=1.0;
[0062] c. Cropping and scaling: The molten pool-arc region of interest (ROI) is automatically extracted based on the Otsu threshold segmentation algorithm. The ROI is scaled to 224×224 pixels and converted into standardized image data with dimensions of (number of samples, 224, 224, 3), where 3 represents the RGB channels.
[0063] 3. Historical welding data processing: using the 3σ criterion Remove abnormal samples and check whether their process parameters meet the requirements one by one. If any process parameter in the sample exceeds... The range, i.e., the determination that the sample is an abnormal sample, such as a low carbon steel Q235+5mm sample with a welding current of 550A, which far exceeds the range of the group. =200A、 =50A corresponds to 3 The upper limit is 350A, which is considered abnormal. Therefore, the calculation should be done by grouping materials and thickness. and This preliminary step avoids deviations in anomaly judgment caused by differences in parameter ranges under different working conditions, improves the accuracy of anomaly rejection, and adapts to actual application scenarios involving welding of multiple materials and specifications.
[0064] And construct a structured relational database of "process parameters - workpiece information - defect results", which includes the following steps:
[0065] a. Data collection and aggregation:
[0066] Process parameter data: Extracted from the logs of the system data acquisition module, containing time sequence parameter files of historical welding processes, in CSV / JSON format. It needs to be associated with the acquisition timestamp of the corresponding workpiece to ensure the complete parameter sequence of a single workpiece. Each workpiece should correspond to at least one complete set of time sequence parameters, with a time step of 100-200.
[0067] Workpiece information data: Exported from the production management system, linked to production work orders by "workpiece number", core attributes such as material, thickness, and bevel type are extracted, and production batch information is supplemented;
[0068] Defect result data: Import flaw detection reports from the quality inspection system and extract the core information of "workpiece number - defect type - defect level - inspection method" to ensure that each report corresponds to a unique workpiece number;
[0069] Summary method: Create a temporary data summary table, using "workpiece number + welding timestamp" as the temporary association key to initially summarize the three types of data and form the original summary dataset. The sample size is required to be ≥5000 groups, covering all target materials and thickness ranges.
[0070] b. Database construction:
[0071] A structured table structure is designed using the relational database MySQL 8.0. Strong binding of three types of data is achieved through primary key-foreign key relationships. A total of four core tables are designed, each with the following structure:
[0072] The main table for workpiece information (tb_workpiece_info) includes: a primary key (workpiece_id, a unique workpiece number), and fields (material_code, thickness, groove_type, batch_no, welding_position, and create_time).
[0073] The process parameter table (tb_process_param) includes: a primary key (param_id), a foreign key (workpiece_id, associated with the main table of workpiece information), and fields (current_seq - current time-series data path, voltage_seq - voltage time-series data path, speed - welding speed, gas_flow - gas flow rate, sample_freq - sampling frequency, collect_time - collection timestamp); Note: Due to the large volume of time-series data, a "path storage" method is adopted (the actual time-series data is stored in the server file system, and the table records the file path) to improve query efficiency;
[0074] The defect result table (tb_defect_result) contains: a primary key (defect_id), a foreign key (workpiece_id, associated with the main table of workpiece information), and fields (defect_type - defect type, defect_level - defect level, defect_position - defect location, detection_method - detection method, detection_time - detection time, detector_id - detector ID).
[0075] The data relationship table (tb_data_relation) includes: primary key (relation_id), fields (workpiece_id, param_id, defect_id, data_status - data status: 0 - uncleaned / 1 - cleaned / 2 - used for model training), which serve as the core relationship table to achieve indirect relationships between the three types of data, facilitating subsequent data status management;
[0076] c. Data processing:
[0077] The original aggregated data is cleaned to eliminate noise, missing values, and format inconsistencies. When process parameters are missing (missing rate ≤ 5%): linear interpolation is used to complete the time-series parameters; when workpiece information is missing: it is completed through production work order tracing, with untraceable data marked as "invalid data"; when defect results are missing: they are completed by associating with flaw detection reports, and samples without flaw detection reports are removed; when handling outliers: call 3... The standard is to handle abnormal process parameters.
[0078] In this embodiment, the CNN-LSTM and ResNet-Attention collaborative model module is responsible for multi-source feature extraction and fusion, and is the core of the system. Specifically, it includes a CNN-LSTM sub-model, a ResNet-Attention sub-model, and a feature fusion unit.
[0079] In this embodiment, a CNN-LSTM sub-model is used to extract local mutation features and long-range dynamic patterns from a standardized time-series parameter sequence. The network structure of the CNN-LSTM sub-model is as follows:
[0080] 3 convolutional layers:
[0081] Convolutional layer 1: Kernel size 3×1, number of kernels 32, stride 1, padding method "same", activation function ReLU, batch normalization, dropout rate 0.2, output dimension: (number of samples, time step, 32).
[0082] Second convolutional layer: kernel size 5×1, number of kernels 64, stride 1, padding "same", activation function ReLU, batch normalization, dropout rate 0.2, output dimension: (number of samples, time step, 64).
[0083] The third convolutional layer has a kernel size of 3×1, a number of kernels of 128, a stride of 1, padding of "same", activation function ReLU, batch normalization, dropout rate of 0.2, and output dimensions of (number of samples, time step, 128).
[0084] Flattening layer: Maps the (number of samples, time step, 128) features output by the 3rd convolutional layer to a one-dimensional vector of (number of samples, time step × 128);
[0085] LSTM layer 2:
[0086] The first LSTM layer has 256 hidden units, returns a sequence (return_sequences=True), has a dropout probability of 0.2, a recurrent_dropout probability of 0.1, and an output dimension of (number of samples, time step, 256).
[0087] The second LSTM layer has 256 hidden units, does not return sequences (return_sequences=False), has a dropout probability of 0.2, a recurrent_dropout probability of 0.1, and an output dimension of (number of samples, 256).
[0088] Function: The first to third convolutional layers extract local features from the time series data, such as sudden rises / falls in welding current and voltage fluctuations. The second LSTM layer captures the dynamic correlation of parameters over time, such as the temporal correlation between persistently high current and crack formation. Finally, a 256-dimensional time series feature vector is output.
[0089] In this embodiment, the ResNet-Attention sub-model, based on the base network (ResNet50) and attention mechanism, extracts deep spatial features of the melt pool image and strengthens the weights of defect regions. The ResNet50 structure is as follows:
[0090] conv1_x layer: 7×7 convolution (number of samples 64, stride 2, padding is "same") + 3×3 max pooling, stride 2, output dimension is (number of samples, 112, 112, 64).
[0091] conv2_x layer: 3 residual blocks (each residual block contains 2 layers of 3×3 convolutions, number 64, stride 1), output dimension: (number of samples, 56, 56, 64).
[0092] conv3_x layer: 4 residual blocks (each residual block contains 2 layers of 3×3 convolutions, number 128, stride 2), output dimension: (number of samples, 28, 28, 128).
[0093] conv4_x layer: 6 residual blocks (each residual block contains 2 layers of 3×3 convolutions, number 256, stride 2), output dimension: (number of samples, 14, 14, 256).
[0094] conv5_x layer: 3 residual blocks (each residual block contains 2 layers of 3×3 convolutions, number of layers 512, stride 2), output dimension: (number of samples, 7, 7, 512);
[0095] The attention mechanism (SE-CBAM hybrid mechanism) is as follows:
[0096] 1. Channel Attention (SEBlock):
[0097] Global average pooling: transforms the (number of samples, 7, 7, 512) feature map output by conv5_x into a (number of samples, 1, 1, 512) channel descriptor (formula: c is the channel index);
[0098] Compression-excitation: The channel weight vector (number of samples, 1, 1, 512) is generated through two fully connected layers (Layer 1: input 512 → output 32, ReLU activation; Layer 2: input 32 → output 512, Sigmoid activation).
[0099] Channel weighting: Multiply the channel weight vector with the conv5_x feature map channel by channel to strengthen the weight of channels associated with melt pool morphology (such as edge detection channels). The output dimension is (number of samples, 7, 7, 512).
[0100] 2. Spatial Attention CBAM:
[0101] Channel pooling: Max pooling (1×1) and average pooling (1×1) are performed on the SEBlock output feature map to obtain two feature maps (number of samples, 7, 7, 1);
[0102] Fusion weighting: The two feature maps are concatenated into (number of samples, 7, 7, 2), and a spatial weight map (number of samples, 7, 7, 1) is generated through a 1×1 convolution (output channel 1, Sigmoid activation).
[0103] Spatial weighting: The spatial weight map is multiplied pixel by pixel with the SEBlock output feature map to enhance the features of defect areas, such as bright spots corresponding to pores and dark lines corresponding to cracks. The output dimension is (number of samples, 7, 7, 512).
[0104] Feature compression: Global average pooling is performed on the feature map output by the attention mechanism to obtain a vector with dimensions (number of samples, 1, 1, 512). The input is 512 and the output is 256 through a fully connected layer. ReLU activation is used to compress the dimension, and finally a 256-dimensional feature vector is output.
[0105] In this embodiment, an adaptive fusion of temporal and spatial features is achieved through a feature fusion unit to avoid the dominance of a single feature. The fusion steps are as follows:
[0106] A. Feature concatenation: The temporal feature vector (T, dimension 256) and the spatial feature vector (S, dimension 256) are concatenated into a fusion vector of (number of samples, 512);
[0107] B. Weight Calculation: Weights are calculated using a fully connected layer (input 512 → output 2, ReLU activation) and the Softmax function (formula: , (where C is the fusion vector, w1 / w2 are the weights, and b1 / b2 are the biases) Calculate the weight coefficients: temporal feature weight α and spatial feature weight β.
[0108] C. Weighted fusion: via formula The collaborative feature vector is obtained, where For collaborative feature vectors, For time series feature vectors, For spatial feature vectors, L2 normalization is performed, the L2 norm of the collaborative feature vector is calculated, and each element of the vector is normalized and scaled. The collaborative feature vector is then mapped onto a unit hypersphere to eliminate the fusion bias caused by the difference in numerical scale between the two types of features, thereby improving stability. The calculation formula is as follows: ;
[0109] Output: 256-dimensional collaborative feature vector, with dimensions (number of samples, 256), comprehensively representing the temporal dynamics and spatial morphological characteristics of the welding process.
[0110] In this embodiment, the parameter recommendation module outputs the optimal process parameters based on the collaborative feature vector and workpiece information:
[0111] Input: Collaborative feature vector (256-dimensional) + workpiece information (material / thickness / bevel form, converted into a 10-dimensional vector through one-hot encoding), the concatenated input dimension is (number of samples, 266).
[0112] Network architecture: Layer 3 fully connected network, specific configuration:
[0113] First hidden layer: Input 256 → Output 128, activation function ReLU, dropout probability 0.2;
[0114] Second hidden layer: Input 128 → Output 64, activation function ReLU, dropout probability 0.2;
[0115] 3rd hidden layer: Input 64 → Output 32, activation function ReLU;
[0116] Output layer: Input 32 → Output 4 (corresponding to current / voltage / velocity / gas flow rate), activation function Linear;
[0117] The objective function of the genetic algorithm is:
[0118] ;
[0119] Where D is the penetration rate (target value ±0.5mm), H is the height rate (target value ±0.3mm), and R is the width-to-depth ratio rate (target value 2-3).
[0120] Constraints: Welding current ∈ [80,500]A, arc voltage ∈ [15,50]V, welding speed ∈ [5,50]mm / s, shielding gas flow rate ∈ [5,25]L / min;
[0121] Algorithm parameters: population size 50, number of iterations 30, crossover probability 0.8, mutation probability 0.1;
[0122] Output: Optimal combination of welding process parameters, with the following accuracy: current ±1A, voltage ±0.1V, speed ±0.1mm / s, and gas flow rate ±0.1L / min. Recommended error ≤5%.
[0123] In this embodiment, the defect prediction module predicts the defect type and its probability of occurrence based on collaborative feature vectors:
[0124] Input: Collaborative feature vector (256 dimensions);
[0125] Network structure: Layer 2 fully connected network, specifically configured as follows:
[0126] First hidden layer: Input 256 → Output 128, activation function ReLU, dropout rate 0.2;
[0127] Second hidden layer: Input 128 → Output 64, activation function ReLU, dropout rate 0.2;
[0128] Output layer: Input 64 → Output 3 (corresponding to pores / cracks / lack of fusion), activation function Sigmoid;
[0129] Prediction logic: Output three probability values p1, p2, and p3, corresponding to the occurrence probabilities of three types of defects: porosity, cracks, and lack of fusion, respectively; preset warning threshold (customizable, default 80%); if any probability > the threshold, trigger an audible and visual warning.
[0130] Output: The defect prediction results are defect type and corresponding probability, with prediction accuracy ≥96%, precision ≥95%, and recall ≥94%.
[0131] End-to-end training is performed on the fully connected layers of the CNN-LSTM sub-model, ResNet-Attention sub-model, feature fusion unit, parameter recommendation module, and defect prediction module. Feature extraction (CNN-LSTM sub-model, ResNet-Attention sub-model) is trained concurrently with the parameter recommendation and defect prediction modules. The weights of all modules are updated via backpropagation, rather than extracting features first and then training the downstream tasks separately. The specific training process is as follows:
[0132] Dataset Construction: 5000 sets of arc welding samples were collected, including 2000 sets of low carbon steel Q235, 2000 sets of stainless steel 304, and 1000 sets of aluminum alloy 6061; the thickness was evenly distributed from 3 to 20 mm, and divided into a training set of 3500 sets, a validation set of 750 sets, and a test set of 750 sets according to a ratio of 7:1.5:1.5.
[0133] Loss function: A weighted multi-task loss function is used, the formula of which is:
[0134] ;
[0135] in: For defect prediction loss: Binary cross-entropy loss formula: , For defect labels (1 for presence, 0 for absence)); Recommended loss for parameters: Mean squared error loss formula: , For actual parameters, (For prediction parameters)
[0136] Optimization strategy: Employ the Adam optimizer (initial learning rate 0.001), combined with cosine annealing learning rate scheduling (…). , , Training batch size 32, training epochs 100, early stopping strategy (stop if the validation set loss does not decrease for 10 consecutive epochs);
[0137] Model saving: Save the trained model, including CNN-LSTM, ResNet-Attention, and fully connected layer weights, in HDF5 format. The model file size should be ≤200MB.
[0138] In this embodiment, the visual interaction module implements human-computer interaction and real-time content display on either the web client based on the Vue.js framework or the desktop client based on the Qt framework.
[0139] Process parameter comparison: Time series curves of current parameters and recommended parameters, with the X-axis representing time and the Y-axis representing parameter values. Blue represents the current value and red represents the recommended value.
[0140] Image annotation: Real-time molten pool image overlaid with defect thermal map, red area is high-risk defect area, thermal value corresponds to defect probability;
[0141] Prediction results: defect type, probability of occurrence, and warning status; defects exceeding the threshold are highlighted in red.
[0142] Statistical analysis: Line chart showing the parameter optimization rate (i.e., the percentage of parameters meeting the standards after optimization) and the downward trend of the defect rate over the past 30 days;
[0143] Interactive features: Operators can manually adjust parameters within ±10% of the recommended parameters. The system automatically records the adjustment log, including the adjustment time, parameters before and after the adjustment, and operator ID. The log is used for incremental model learning. Every 1000 sets of new data are accumulated, the weights of the fully connected layers of the model are updated.
[0144] Working principle:
[0145] Initialization phase: The operator inputs workpiece information (material, thickness, bevel type) through the touch screen, the system loads the pre-trained model, self-tests the data acquisition equipment (sensors, camera, acquisition card), and confirms that the equipment communication is normal;
[0146] Data acquisition and preprocessing stage: synchronously acquire 2 seconds of time-series process parameter data, sampling frequency 200Hz, 400 time steps and 1 frame of molten pool image, wavelet denoising, interpolation completion and normalization of time-series process parameter data, image data enhancement, denoising and ROI cropping.
[0147] Collaborative inference stage: The preprocessed data is input into the CNN-LSTM and ResNet-Attention collaborative model, and features are extracted sequentially through the CNN-LSTM sub-model and the ResNet-Attention sub-model. The collaborative feature vector is generated by the feature fusion unit.
[0148] Decision and early warning stage: The collaborative feature vector + workpiece information input parameter recommendation module outputs and displays the optimal process parameters; the collaborative feature vector input defect prediction module calculates the defect probability, and triggers an audible and visual early warning if the threshold is exceeded.
[0149] Interaction and Recording Phase: Operators can manually fine-tune parameters within a range of ±10% of the recommended value. Adjustment commands are sent to the welding equipment in real time. The system stores the collected data, model output results, and operation logs every 10 seconds. The log storage path is server / data / logs / .
[0150] Model iteration phase: Every 1000 new sets of data are accumulated, the model is retrained offline, and the weights of the fully connected layers are updated to ensure that the model performance continues to optimize as the amount of data increases.
[0151] The above description is merely a preferred embodiment of the present invention and is illustrative rather than restrictive. Those skilled in the art will understand that many changes, modifications, and even equivalents can be made within the spirit and scope defined by the claims of the present invention, all of which will fall within the protection scope of the present invention.
Claims
1. A welding process parameter recommendation and defect prediction system, characterized in that, The prediction system includes a data acquisition module, a data preprocessing module, a feature extraction and fusion module, a parameter recommendation module, a defect prediction module, and a visualization interaction module. The output of the data acquisition module is connected to the input of the feature extraction and fusion module. The outputs of the feature extraction and fusion module and the feature processing module are connected to the input of the feature extraction and fusion module. The output of the feature extraction and fusion module is connected to the input of the parameter recommendation module and the defect prediction module. The outputs of the parameter recommendation module and the defect prediction module are connected to the input of the visualization interaction module. The data acquisition module is used to collect multi-source heterogeneous data during the welding process; the data preprocessing module performs standardization processing on the collected multi-source heterogeneous data; the feature extraction and fusion module is used to extract features from the multi-source heterogeneous data and perform feature fusion; the parameter recommendation module outputs the optimal process parameters based on the collaborative feature vector and workpiece information; the defect prediction module predicts the defect type and occurrence probability based on the collaborative feature vector; and the visualization interaction module realizes human-computer interaction and provides visualization display.
2. The welding process parameter recommendation and defect prediction system as described in claim 1, characterized in that, The multi-source heterogeneous data collected by the data acquisition module includes time-series process parameter data, welding process image data, and historical welding data. The time-series process parameter data includes welding current, arc voltage, welding speed, and shielding gas flow rate. The sampling frequency is 100-500Hz, the multi-source heterogeneous data step size is 100-200, the number of samples is 100-200, and the image ROI area accounts for 30%-50% of the original image. Historical welding data includes samples of low carbon steel Q235, stainless steel 304, and aluminum alloy 6061.
3. The welding process parameter recommendation and defect prediction system as described in claim 1, characterized in that, The data preprocessing module uses the Daubechies-4 wavelet basis to perform noise reduction, linear interpolation completion, and maximum-min normalization on the time-series process parameter data. CLAHE was used to enhance the images in the welding process image data. The CLAHE-enhanced images were then processed by 3×3 convolution kernel Gaussian filtering to eliminate noise. Then, Otsu's method was used to perform unsupervised automatic thresholding segmentation on the denoised images. From the segmented images with clear foreground and background boundaries, ROI sub-images containing the complete target were accurately cropped, irrelevant background interference was removed, and the cropped ROI images were normalized and scaled to a size of 224×224 pixels. Adopt 3 The criteria remove abnormal samples from historical welding data and construct a structured relational database of "process parameters - workpiece information - defect results".
4. The welding process parameter recommendation and defect prediction system as described in claim 1, characterized in that, The feature extraction and fusion module consists of a CNN-LSTM and ResNet-Attention collaborative model, including a CNN-LSTM sub-model, a ResNet-Attention sub-model, and a feature fusion unit. The CNN-LSTM sub-model consists of 3 convolutional layers and 2 LSTM layers. Each convolutional layer is followed by a ReLU activation function, a batch normalization layer, and a dropout layer. Each LSTM layer has 256 hidden units. Dropout layers and recurrent dropout layers are configured between layers to enhance the model's generalization ability. Through the synergistic effect of the 3 convolutional layers and 2 LSTM layers, the output is a temporal feature vector with a dimension of 256. ; The ResNet-Attention sub-model uses ResNet50 as its backbone network and adopts residual block groups from conv1_x to conv5_x as its basic feature extraction architecture. At the feature output of the conv5_x residual block group, SEBlock and CBAM are integrated sequentially. Through an attention mechanism, adaptive feature enhancement and redundancy suppression are achieved, outputting a spatial feature vector with a dimension of 256. ; The feature fusion unit maps and transforms the 512-dimensional input features through a fully connected layer, outputting a 2-dimensional feature vector. The weight coefficients of the feature vector are then calculated using the Softmax function. and This set of weighting coefficients is used to perform weighted fusion on the 256-dimensional collaborative feature vectors in the original feature space after L2 normalization, resulting in a weighted 256-dimensional collaborative feature vector. .
5. The welding process parameter recommendation and defect prediction system as described in claim 4, characterized in that, The convolutional layers of the CNN-LSTM sub-model adopt the "same" mode boundary. The first LSTM layer returns a sequence, and the second LSTM layer does not return a sequence. After CNN spatial feature extraction and LSTM temporal feature aggregation, the output is a two-dimensional temporal feature vector with dimensions of (number of samples, 256), which corresponds to the dynamic correlation features of welding parameters.
6. The welding process parameter recommendation and defect prediction system as described in claim 4, characterized in that, The ResNet50 of the ResNet-Attention sub-model includes four residual block groups: conv2_x with 3 residual blocks, conv3_x with 4 residual blocks, conv4_x with 6 residual blocks, and conv5_x with 3 residual blocks. First, conv1_x is performed as a 7×7 convolution, followed by 3×3 max pooling. After hierarchical feature extraction and feature weighting optimization by the Attention mechanism of the ResNet50 backbone network, the output is a two-dimensional spatial feature vector with dimensions of (number of samples, 256), corresponding to the melt pool defect association features.
7. The welding process parameter recommendation and defect prediction system as described in claim 4, characterized in that, The weight calculation of the feature fusion unit satisfies Linear fusion calculation is performed based on preset weights to obtain the original collaborative feature vector, ensuring adaptive fusion of temporal and spatial features. The fusion formula is as follows: ; In the formula, For collaborative feature vectors, For time series feature vectors, For spatial feature vectors; The obtained collaborative feature vectors are subjected to L2 normalization. By calculating the L2 norm of the collaborative feature vectors and normalizing and scaling each element of the vector, the collaborative feature vectors are mapped onto the unit hypersphere, eliminating the fusion bias caused by the difference in numerical scale between the two types of features.
8. The welding process parameter recommendation and defect prediction system as described in claim 1, characterized in that, The parameter recommendation module takes collaborative feature vectors and 10-dimensional one-hot encoded workpiece information as input. After processing by a 3-layer fully connected network and a genetic algorithm, it outputs optimal process parameters with an error ≤5%. The objective function of the genetic algorithm is: ; Where D is the melting depth compliance rate, H is the excess height compliance rate, and R is the width-to-depth ratio compliance rate; The parameters of the genetic algorithm are: population size of 50, number of iterations of 30, crossover probability of 0.8, and mutation probability of 0.
1. The constraints of the genetic algorithm are: welding current ∈ [80,500]A, arc voltage ∈ [15,50]V, welding speed ∈ [5,50]mm / s, shielding gas flow rate ∈ [5,25]L / min, and parameter accuracies of ±1A, ±0.1V, ±0.1mm / s, and ±0.1L / min, respectively.
9. The welding process parameter recommendation and defect prediction system as described in claim 1, characterized in that, The defect prediction module takes the collaborative feature vector as input, processes it through a 2-layer fully connected network and a Sigmoid algorithm, and outputs the probabilities of three types of defects: porosity, cracks, and lack of fusion, with an accuracy rate of ≥96%. It supports custom thresholds, and triggers an audible and visual warning with a 2kHz audio signal and a flashing red light when the threshold is exceeded.
10. The welding process parameter recommendation and defect prediction system as described in claim 1, characterized in that, The visualization interaction module is developed based on Vue.js or PyQt5, supports Web / desktop display, and allows manual participation and adjustment of relevant parameters of log recording. The adjustment range is ±10%. The relevant parameters of log recording include adjustment time, parameters before and after adjustment, and operator ID. The weights of the fully connected layer of the model are updated every 1000 sets of new data.