Method for welding and forming a thick-walled square tube
By constructing a dual-branch processing framework to analyze the molten pool position offset and heat-affected zone grayscale distribution during the welding process of thick-walled square tubes, real-time intelligent analysis of the welding status was achieved, solving the problem of welding defect correction in existing technologies and improving welding quality and stability.
Patent Information
- Application Number
- CN202610611597.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-17
AI Technical Summary
Existing technologies cannot correct forming defects in the welding process of thick-walled square tubes in real time. Especially under the interference of arc light and spatter noise, traditional image processing methods are prone to misjudgment or loss of key features, and it is difficult to integrate information on molten pool offset and thermal field asymmetry, which affects welding quality and process stability.
By continuously acquiring images of the molten pool during the welding process to form an image time sequence, a dual-branch processing framework is used to extract the molten pool position offset and the difference in grayscale distribution of the heat-affected zone. Correlation indicators are calculated to determine abnormal welding conditions, and correction commands or alarm prompts are output to achieve intelligent analysis of the dynamic performance of the molten pool and the evolution of the thermal field.
It improves welding quality and process stability. By intelligently analyzing welding defects, it enables root cause analysis of the welding process, avoids process disorder caused by blind adjustments, and enhances the self-adaptability of the welding system.
Smart Images

Figure CN122415566A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent welding defect detection technology, and in particular to a method for welding and forming thick-walled square tubes. Background Technology
[0002] Thick-walled square tubes are widely used in building structures, heavy machinery, and other fields. Their welding quality directly determines the structural load-bearing capacity, fatigue life, and operational safety. During the welding process of thick-walled square tubes, due to the large wall thickness, complex heat dissipation boundaries, and significant heat accumulation effects, forming defects such as welding torch alignment deviation, incomplete sidewall fusion, insufficient penetration, and uneven heat input in the heat-affected zone are prone to occur. Existing inspection methods mostly rely on post-weld sampling inspection or monitoring of single parameters during welding. However, post-weld inspection cannot correct forming defects in real time. Especially when arc light interference, spatter, and other noise degrade visual image quality, traditional image processing methods are prone to misjudgment or loss of key features. Therefore, there is an urgent need for an adaptive inspection method for the welding formation of thick-walled square tubes that can integrate information on molten pool offset and thermal field asymmetry, and has strong anti-interference capabilities.
[0003] For example, Chinese invention patent CN119693332A, published on March 25, 2025, discloses an automatic identification and acceptance method for aluminum alloy welding and repair defects based on deep learning, relating to the field of image processing technology. This includes information acquisition: acquiring a base image and feedback address information, where the base image is the image to be inspected. The invention uses a set pore shape judgment method to determine the shape of pores. Different types of pores may indicate different welding problems or forming defects. By recognizing the shape, the forming factors of the defects can be better understood, thus assisting in judging their impact on the overall structure and facilitating the formulation of optimized repair strategies. The invention also uses a set acceptance grading method with preset grading standards to classify the processed images, making it easier for users to understand the degree of impact of pore defects.
[0004] Existing technologies cannot intelligently analyze the coupling relationship between the dynamic performance of the molten pool and the evolution of the thermal field during the welding process, making it difficult to conduct root cause intelligent analysis of welding defects, which affects welding quality and process stability. Summary of the Invention
[0005] To address this, the present invention provides a method for welding and forming thick-walled square tubes, which overcomes the problem that existing technologies cannot intelligently analyze the coupling relationship between the dynamic performance of the molten pool and the evolution of the thermal field during the welding process, and are difficult to conduct root cause intelligent analysis of welding forming defects, thus affecting welding quality and process stability.
[0006] To achieve the above objectives, the present invention provides a method for welding and forming thick-walled square tubes, comprising: Images of the molten pool during the welding process of thick-walled square tubes are continuously acquired to form an image time sequence. Based on the inter-frame grayscale jump analysis results of the image time sequence, non-interference frames and interference frames are identified. The image time sequence is input into a dual-branch processing framework. The first branch processing framework extracts the melt pool position offset frame by frame for non-interference frames and performs linear interpolation on the time of interference frames to form a first time trajectory. The second branch processing framework calculates the gray-scale distribution difference of the heat-affected zone frame by frame for all frames to form a second time trajectory. Within a sliding time window, a correlation index is calculated between the position offset and the gray-scale distribution difference. The correlation index includes an offset unidirectional coefficient and a temporal performance coefficient. The offset unidirectional coefficient is calculated based on the positive and negative characteristics of the position offset and the gray-scale difference. The temporal performance coefficient is determined based on the correlation peak value between the first temporal trajectory and the second temporal trajectory. Based on the associated indicators, it is determined whether the welding status is abnormal, and in response to the determination result of abnormal welding status, the instruction output content is determined, including the correction instruction for the welding torch and the abnormal alarm prompt of the sensor.
[0007] Furthermore, the process of identifying non-interference frames includes: Calculate the grayscale jump value between adjacent frames in an image time sequence; The grayscale jump value is compared with a preset grayscale jump threshold. Frames with grayscale jump values less than or equal to the grayscale jump threshold are marked as non-interference frames, and frames with grayscale jump values greater than the grayscale jump threshold are marked as interference frames.
[0008] Furthermore, the process by which the first branch processing framework extracts the melt pool position offset frame by frame from the non-interference frames includes: Edge detection is performed on the molten pool image in the non-interference frame to extract the geometric center coordinates of the molten pool edge contour in the molten pool image; Calculate the pixel deviation distance between the geometric center coordinates and the weld centerline, and determine the pixel deviation distance as the molten pool position offset.
[0009] Furthermore, the process of forming the first time-series trajectory by linear interpolation of the interference frame time includes: For any time t that is identified as an interfering frame i Obtain the time t of the most recent non-interference frame before the interference frame. a The corresponding first position offset, and the time t of the nearest non-interference frame after the interference frame is obtained. b The corresponding second position offset; Calculate time t i interpolation offset D iThe calculated interpolation offset is filled into the position of the corresponding time in the first time series trajectory to form a continuous first time series trajectory.
[0010] Furthermore, the process of calculating the grayscale distribution difference of the heat-affected zone for the molten pool image of the non-interference frame includes: The heat-affected zone is divided into a left heat-affected zone and a right heat-affected zone, with the weld centerline as the boundary. Calculate the average gray value of the left heat-affected zone and the average gray value of the right heat-affected zone respectively; The difference between the average gray value on the left and the average gray value on the right is defined as the gray distribution difference.
[0011] Furthermore, the process of calculating the grayscale distribution difference of the thermally affected area in the melt pool image of the interfering frame includes: For any time frame marked as an interference frame, obtain the first gray-scale distribution difference corresponding to the nearest non-interference frame before the interference frame and the second gray-scale distribution difference corresponding to the nearest non-interference frame after the interference frame; The weighted sum of the first gray-level distribution difference and the second gray-level distribution difference is taken as the gray-level distribution difference at that time of the interference frame. The sum of the weighting coefficients of the first gray-scale distribution difference and the second gray-scale distribution difference is 1, and frames with closer temporal distances are assigned larger coefficients.
[0012] Furthermore, the calculation process of the offset homing coefficient includes: Within the sliding time window, the number of frames where the numerical signs of the statistical position offset and the grayscale distribution difference are the same. The ratio of the number of frames with the same symbol to the total number of frames in the window is calculated, and the ratio is determined as the offset direction coefficient.
[0013] Furthermore, the calculation process of the timing performance coefficients includes: The first and second time-series trajectories within the sliding time window are normalized respectively, and the cross-correlation function of the two normalized trajectories is calculated. The number of lag frames corresponding to the peak value of the cross-correlation function is extracted and determined as the time-series performance coefficient.
[0014] Furthermore, the process of determining whether the welding condition is abnormal includes: The offset homing coefficient is compared with the preset homing coefficient reference value, and the absolute value of the timing performance coefficient is compared with the preset timing performance reference value. If the offset coefficient is greater than the reference value of the offset coefficient, and the absolute value of the timing performance coefficient is less than or equal to the reference value of the timing performance, then the welding condition is considered normal. If the offset unidirectional coefficient is less than or equal to the unidirectional coefficient reference value, or the absolute value of the timing performance coefficient is greater than the timing performance reference value, then the welding condition is determined to be abnormal.
[0015] Furthermore, the process of determining the content of the instruction output includes: If the offset unidirectional coefficient is less than or equal to the unidirectional coefficient reference value, and the absolute value of the timing performance coefficient is less than or equal to the timing performance reference value, then the welding torch is output with a correction command pointing in the opposite direction based on the positive or negative result of the average position offset within the sliding time window. If the offset homing coefficient is greater than the homing coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, an alarm prompt for sensor synchronization abnormality will be output. If the offset sync coefficient is less than or equal to the sync coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, then only a sensor synchronization abnormality alarm will be output, and the correction command will not be executed temporarily.
[0016] The beneficial effects of the technical solution presented in this application include: constructing an image time sequence by continuously acquiring images of the molten pool during the welding process of thick-walled square tubes, identifying non-interference frames and interference frames; extracting the molten pool position offset from the images of non-interference frames using a first branch processing framework and generating a first time-series trajectory; calculating the grayscale distribution difference in the heat-affected zone using a second branch processing framework and forming a second time-series trajectory; determining whether the welding state is abnormal based on the correlation index between the position offset and the grayscale distribution difference, and determining the instruction output content under abnormal welding state conditions. Furthermore, intelligent analysis of the coupling relationship between the dynamic performance of the molten pool and the evolution of the thermal field during the welding process enables root cause intelligent analysis of welding defects, improving welding quality and process stability.
[0017] Furthermore, the temperature distribution of the heat-affected zone in this invention is directly related to the spatial distribution of the arc heat input. When the welding torch is centered, the heat input on the left and right sides is symmetrical and the grayscale is similar. When the welding torch is misaligned or the heat dissipation conditions are asymmetrical, the temperature of the heat-affected zone on the side closer to the arc increases significantly, and the average grayscale value increases accordingly. Thus, the symmetry of the heat input is quantitatively characterized by relying on the relative grayscale relationship.
[0018] Furthermore, the present invention utilizes the difference in processing logic between the two branch processing frameworks, which stems from the different sensitivities of the two types of features to image quality. This dual-branch processing architecture can maximize the utilization of the information value of each frame and avoid directly discarding interfering frames, thus preventing the loss of temporal information.
[0019] Furthermore, this invention employs a strategy of jointly determining the offset synchronicity coefficient and the timing performance coefficient using two indicators. When the synchronicity coefficient is normal but the timing coefficient is abnormal, the system identifies a sensor synchronization problem and triggers an alarm; when the timing coefficient is normal but the synchronicity coefficient is abnormal, the system identifies welding torch misalignment and outputs a correction command. The dual-indicator determination logic improves the comprehensiveness and reliability of anomaly detection.
[0020] Furthermore, based on the anomaly determination results, the present invention automatically outputs lateral correction commands for the welding torch or synchronous anomaly alarm prompts from the sensors, achieving precise matching between the root cause of the anomaly and the intervention method, avoiding process disorder caused by blindly adjusting welding parameters, and enabling intelligent root cause analysis of welding forming defects through differentiated strategies, thereby improving welding quality and process stability. Attached Figure Description
[0021] Figure 1 This is a step diagram of the welding and forming method for thick-walled square tubes according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the steps of calculating the grayscale distribution difference in the heat-affected zone using the second branch processing framework of this embodiment of the invention. Figure 3 This is a flowchart illustrating the logic for determining whether the welding status is abnormal according to an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0023] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0024] It should be noted that in the description of this invention, the terms "upper," "lower," "inner," "outer," etc., which indicate the direction or positional relationship, are based on the direction or positional relationship shown in the drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.
[0025] It should be understood that although the terms "first," "second," etc., may be used in this invention to describe various types of information, these information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information.
[0026] Please see Figure 1 The diagram shows the steps of a thick-walled square tube welding and forming method according to an embodiment of the present invention. The thick-walled square tube welding and forming method of the present invention includes: Step S100: Continuously acquire images of the molten pool during the welding process of thick-walled square tubes to form an image time sequence. Based on the inter-frame grayscale jump analysis results of the image time sequence, identify non-interference frames and interference frames. Step S200: The image time sequence is input into the dual-branch processing framework. The first branch processing framework extracts the melt pool position offset frame by frame for non-interference frames and performs linear interpolation on the time of interference frames to form a first time trajectory. The second branch processing framework calculates the gray-scale distribution difference of the heat-affected zone frame by frame for all frames to form a second time trajectory. Step S300: Calculate the correlation index between the position offset and the gray-scale distribution difference within the sliding time window. The correlation index includes the offset unidirectional coefficient and the temporal performance coefficient. The offset unidirectional coefficient is calculated based on the positive and negative characteristics of the position offset and the gray-scale difference. The temporal performance coefficient is determined based on the correlation peak of the first temporal trajectory and the second temporal trajectory. In this invention, the length of the sliding time window is set to 3 seconds, and 30 frames of images are acquired at a frame rate of 10 frames per second. Those skilled in the art can adjust the window length according to the following principles: the window length must be greater than the maximum physical delay of the welding torch offset to the heat-affected zone, while ensuring that the number of effective frames in the window meets the statistical requirements.
[0027] Step S400: Determine whether the welding status is abnormal based on the associated indicators, and in response to the determination result of abnormal welding status, determine the instruction output content, including the correction instruction for the welding torch and the abnormal alarm prompt of the sensor.
[0028] Specifically, the process of identifying non-interference frames includes: Calculate the grayscale jump value between adjacent frames in an image time sequence; In practice, the calculation method for the inter-frame grayscale jump value is as follows: for the current frame F t Compared to the previous frame F t-1 The absolute value of the grayscale difference between the corresponding pixels is calculated as the grayscale transition value.
[0029] The grayscale jump value is compared with a preset grayscale jump threshold. Frames with grayscale jump values less than or equal to the grayscale jump threshold are marked as non-interference frames, and frames with grayscale jump values greater than the grayscale jump threshold are marked as interference frames.
[0030] In this invention, the grayscale jump threshold is pre-calibrated. For example, 10 frames of images with no initial arc light interference are acquired, the average value μ and standard deviation δ of the grayscale difference between adjacent frames are calculated, and the grayscale jump threshold is set to μ+3δ.
[0031] Those skilled in the art will understand that during the welding of thick-walled square tubes, the electric arc generates intense arc light, spatter, and smoke, causing some captured frames to be overexposed or have blurred textures. These interfering frames cannot be used to extract accurate geometric features of the molten pool. The grayscale jump value between adjacent frames can quantify the degree of image abrupt change: during normal welding, the molten pool morphology changes gradually, and the grayscale difference between frames is small; however, when the arc light flashes or spatter passes by, a drastic grayscale jump occurs. Therefore, by setting a reasonable grayscale jump threshold, the image sequence can be automatically divided into non-interfering frames that can be used for feature extraction and interfering frames that require further processing.
[0032] Specifically, the process by which the first branch processing framework extracts the melt pool position offset frame by frame from the non-interference frames includes: Edge detection is performed on the molten pool image in the non-interference frame to extract the geometric center coordinates of the molten pool edge contour in the molten pool image; Calculate the pixel deviation distance between the geometric center coordinates and the weld centerline, and determine the pixel deviation distance as the molten pool position offset.
[0033] Optionally, edge detection can employ the Canny edge detection algorithm. After detecting the edge contour of the molten pool, the geometric center coordinates are determined by calculating the geometric center coordinates of the region enclosed by the contour. Those skilled in the art will understand that the Canny edge detection algorithm can stably extract closed edges in scenarios where the gray-scale gradient of the molten pool changes significantly. This is a commonly used technique in image processing and will not be elaborated upon here.
[0034] In this invention, the positive X-axis is defined as the horizontal direction to the right and the positive Y-axis is defined as the vertical direction downward. A rectangular coordinate system is established with the upper left corner of the acquired molten pool image as the origin. The difference between the horizontal coordinate of the geometric center of the molten pool and the horizontal coordinate of the weld centerline is defined as the molten pool position offset.
[0035] In this invention, the weld centerline is obtained by scanning the bevel with a laser vision sensor before welding begins. Specifically, after the welding torch is in place and before the arc is started, laser stripes are projected onto the workpiece surface. The camera captures the stripe image and extracts the left and right inflection points of the bevel. The midpoint of the line connecting the two inflection points is connected along the weld direction as the weld centerline. When the bevel shape is irregular, multiple sampling sections are set at equal intervals along the weld direction. The left and right inflection points of the bevel are extracted on each sampling section. The midpoint of the line connecting the two inflection points on each section is calculated. The least squares method is used to fit the midpoints on all sampling sections with a straight line or curve. The smooth trajectory line obtained by fitting is taken as the weld centerline.
[0036] During the welding of thick-walled square tubes, the centering of the welding torch directly affects the symmetry of the molten pool shape and the fusion quality of the sidewalls. When the welding torch is biased to one side, the arc pressure distribution is uneven, and the center of the molten pool will move in the direction of deviation. When the edge contour of the molten pool is clear, the geometric center coordinates can accurately characterize the actual pointing position of the welding torch. The lateral deviation between the geometric center and the preset weld centerline can be used as the offset to quantify the offset of the welding torch centering.
[0037] Specifically, the process of forming the first time-series trajectory by linear interpolation of the interference frame time includes: For any time t that is identified as an interfering frame i Obtain the time t of the most recent non-interference frame before the interference frame. a The corresponding first position offset, and the time t of the nearest non-interference frame after the interference frame is obtained. b The corresponding second position offset; Calculate time t i interpolation offset D i The calculated interpolation offset is filled into the position of the corresponding time in the first time series trajectory to form a continuous first time series trajectory.
[0038] In a specific embodiment, assuming the image acquisition frame rate during the welding process is 30 frames / second, five consecutive frames within a certain period are taken. The position offsets corresponding to the non-interference frames are D1=10, D4=18, and D5=20, respectively. Frame number 1 is a non-interference frame, and the measured position offset is 10 pixels; frame number 4 is a non-interference frame, and the measured position offset is 18 pixels; frames number 2 and 3 are interference frames. Then, the first position offset corresponding to frame number 2 is 10 pixels, and the corresponding second position offset is 18 pixels. Therefore, the interpolation offset corresponding to the interference frame of frame number 2 is 10+(18-10) / (4-1)×(2-1)=12.67≈13 pixels. The first position offset corresponding to the interference frame with frame number 3 is 10 pixels, and the second position offset is 18 pixels. The interpolation offset corresponding to the interference frame with frame number 3 is 10 + (18 - 10) / (4 - 1) × (3 - 1) = 15.33 ≈ 15 pixels, thus forming a complete first time-series trajectory [10, 13, 15, 18, 20].
[0039] It is understandable that the welding torch offset during the welding process is a continuous change, not a sudden change that occurs in a very short time within a single interference frame. Therefore, by using the actual measurement values of the non-interference frames before and after the interference frame to perform linear interpolation, it is reasonable to infer the offset at the time of the interference frame.
[0040] Specifically, please refer to Figure 2As shown, this is a flowchart illustrating the steps of calculating the grayscale distribution difference of the heat-affected zone in the second branch processing framework of this embodiment of the invention. The process of calculating the grayscale distribution difference of the heat-affected zone for the melt pool image of a non-interference frame includes: Step S201: Using the weld centerline as the boundary, the heat-affected zone is divided into a left heat-affected zone and a right heat-affected zone; Step S202: Calculate the average gray value of the left heat-affected zone and the average gray value of the right heat-affected zone respectively; Step S203: The difference between the average gray value on the left and the average gray value on the right is determined as the gray distribution difference.
[0041] In this invention, the heat-affected zone (HAZ) is a strip-shaped area extending a certain pixel width to the left and right sides with the weld centerline as the axis of symmetry. Specifically, taking the center of the molten pool as a reference, 30 pixel units are taken forward and backward along the weld direction, and 50 pixel units are taken to each side perpendicular to the weld centerline to form a rectangular area. This rectangular area is defined as the HAZ. In practical applications, the size of the rectangular area can be adaptively adjusted according to the wall thickness of the thick-walled square tube, the welding heat input, and the camera calibration parameters. The adjustment principle is to ensure that the rectangular area completely covers the welding HAZ.
[0042] For any frame of the image, first extract the grayscale values of all pixels within the left heat-affected zone, and calculate their arithmetic mean G. av1 Similarly, calculate the average gray value G of the heat-affected zone on the right. av2 Then the gray-scale distribution difference is G. av1 -G av2 The difference in grayscale distribution can be positive or negative. A positive value indicates that the grayscale of the heat-affected zone on the left is higher than that on the right, while a negative value indicates that the temperature on the right is higher.
[0043] It is understandable that the temperature distribution in the heat-affected zone is directly related to the spatial distribution of the arc heat input. When the welding torch is centered, the heat input on the left and right sides is symmetrical and the gray values are similar. When the welding torch is misaligned or the heat dissipation conditions are asymmetrical, the temperature of the heat-affected zone on the side closer to the arc increases significantly, and the average gray value increases accordingly. The positive or negative sign of the value reflects which side has a higher heat input, and the magnitude of the value reflects the degree of asymmetry. The symmetry of the heat input is quantitatively characterized by relying on the relative gray value relationship.
[0044] Specifically, the process of calculating the difference in grayscale distribution of the thermally affected area in the melt pool image of the interfering frame includes: For any time frame marked as an interference frame, obtain the first gray-scale distribution difference corresponding to the nearest non-interference frame before the interference frame and the second gray-scale distribution difference corresponding to the nearest non-interference frame after the interference frame; The weighted sum of the first gray-level distribution difference and the second gray-level distribution difference is taken as the gray-level distribution difference at that time of the interference frame. The sum of the weighting coefficients of the first gray-scale distribution difference and the second gray-scale distribution difference is 1, and frames with closer temporal distances are assigned larger coefficients.
[0045] For example, for the interference frame time t i Let t be the time of its most recent non-interference frame. a The next non-interference frame time is t. b The corresponding grayscale distribution differences are T a and T b The time distances are Δt and Δt, respectively. a =t i -t a , Δt b =t b -t i ; The weighting coefficients are assigned using a linear inverse proportional distribution: W a =Δt b / (Δt a +Δt b ), W b =Δt a / (Δt a +Δt b The difference in grayscale distribution of the interfering frames is T. i =W a ×T a +W b ×T b . In a specific embodiment, it is assumed that during the welding process, frame number 5 and frame number 8 are marked as non-interference frames, and their heat-affected zone grayscale distribution differences are T5=10 and T8=18, respectively. Frame number 6 and frame number 7 are continuous interference frames. The process of calculating the grayscale distribution difference of frame number 6 is as follows: The most recent non-interference frame was frame 5, with a time distance Δt. a =6-5=1 frame, the next nearest non-interference frame is frame 8, the time distance is Δt b =8-6=2 frames, weighting coefficient W a =2 / 3, W b =1 / 3, the weighted interpolation result T6=13.
[0046] It is understandable that the temperature distribution in the heat-affected zone changes more slowly than the geometric changes in the molten pool, and has greater thermal inertia. Therefore, the actual grayscale difference at the moment of interference should be close to the weighted average of the measurements of the non-interference frames before and after it. The closer the time distance, the higher the credibility of the frame and the greater the weight assigned.
[0047] Specifically, the calculation process of the offset homing coefficient includes: Within the sliding time window, the number of frames where the numerical signs of the statistical position offset and the grayscale distribution difference are the same. The ratio of the number of frames with the same symbol to the total number of frames in the window is calculated, and the ratio is determined as the offset direction coefficient.
[0048] In a specific embodiment, the sign of the molten pool position offset is defined as follows: with the welding forward direction as a reference, D > 0 indicates that the center of the molten pool is offset to the right, D < 0 indicates that the center of the molten pool is offset to the left, and D = 0 indicates centering; The symbol for the difference in grayscale distribution is defined as follows: T > 0 indicates that the grayscale of the left heat-affected zone is higher than that of the right, which means that the temperature on the left is higher; T < 0 indicates that the grayscale of the left heat-affected zone is lower than that of the right, which means that the temperature on the right is higher; T = 0 indicates that the grayscale of the left heat-affected zone is the same as that of the right, and the temperature distribution on both sides is consistent.
[0049] For any frame, if D and T have the same sign, both positive or both negative, it is recorded as a frame in the same direction; if they have different signs, it is recorded as a frame in opposite directions. If D=0 or T=0, it is considered a neutral frame and is not included in the same-direction or opposite-direction statistics, but it is still counted in the total number of frames.
[0050] Under normal circumstances, the side to which the welding torch is biased will have a higher heat input, which will be reflected as a higher grayscale value on the same side in the heat-affected zone. Therefore, the positive and negative signs of the offset should be consistent with the positive and negative signs of the grayscale difference. If the proportion of frames with the same sign is high, the welding torch alignment is the main issue; if the proportion of frames with the same sign is low, it indicates external interference such as asymmetrical heat dissipation or anisotropic thermal conductivity of the material, enabling rapid diagnosis of the root cause of the abnormality.
[0051] Specifically, the calculation process of the timing performance coefficients includes: The first and second time-series trajectories within the sliding time window are normalized respectively, and the cross-correlation function of the two normalized trajectories is calculated. The number of lag frames corresponding to the peak value of the cross-correlation function is extracted and determined as the time-series performance coefficient.
[0052] For example, with a window length of N=5, the first temporal trajectory sequence D=[20,30,50,40,30]; the unit is pixels, and the second temporal trajectory sequence T=[5,8,12,11,9]; First, Z-score standardization is performed on the first time-series trajectory sequence D and the second time-series trajectory sequence T. Their mean and standard deviation are calculated. The standardized sequence D is obtained by subtracting the mean from each element and then dividing by the standard deviation. norm ≈[-1.373,-0.392,1.569,0.588,-0.392], T norm ≈[-1.633,-0.408,1.225,0.816,0]; Cross-correlation function formula: ; Where N is the total number of image frames contained within the sliding time window; k is the number of lagging frames, representing the time offset of the second time-series trajectory relative to the first time-series trajectory, in frames. When k > 0, it indicates that the thermal response lags behind the melt pool offset; when k < 0, it indicates that the thermal response leads; when k = 0, it indicates that the two are synchronized; D norm [i] represents the value of the i-th frame data in the first time-series trajectory, where i is the frame number and its value ranges from [1, N]. T norm [i+k] is the value of the (i+k)th frame data in the second time-series trajectory, and the value of i+k ranges from [1, N]. When k≥0, summation is performed from i=1 to Nk; when k<0, summation is performed from i=1-k to N, ensuring D norm [i] and T norm The indices of [i+k] are all within the valid range [1, N].
[0053] In this embodiment, N=5, and k=-2,-1,0,1,2 is calculated. According to the above formula, when k=0, R[0]=0.9608; when k=1, R[1]=0.58; when k=-1, R[-1]=0.1; when k=2, R[2]=-0.6673; when k=-2, R[-2]=-0.08. The maximum value of |R[k]| is found to be 0.9608. The peak value of the cross-correlation function is also 0.9608, which corresponds to k=0. The number of lag frames corresponding to the peak value of the cross-correlation function is 0, which means that the time series performance coefficient is 0. This indicates that within this window, the geometric offset of the melt pool and the grayscale change of the heat-affected zone are almost completely synchronized, with no significant thermal conduction delay.
[0054] In actual welding processes, the change in the geometric center of the molten pool caused by welding torch deflection is almost instantaneous, while the heat conduction from the molten pool to the heat-affected zone takes a certain amount of time. Therefore, under normal circumstances, the change in the first time-series trajectory should slightly precede the change in the second time-series trajectory. The number of lag frames corresponding to the correlated peaks reflects this time delay phenomenon.
[0055] Understandably, the melt pool position offset depends on a clear melt pool boundary, and arc interference can cause edge extraction to fail completely. Therefore, the first branch processing framework discards interfering frames and uses interpolation to supplement them. However, the grayscale distribution difference in the heat-affected zone is less affected by arc interference. Even if the image has overexposed areas, the relative grayscale relationship between the two heat-affected zones is still discernible. Therefore, the second branch processing framework can directly calculate for all frames, only needing to smooth the interfering frames. The difference in processing logic between the two branch processing frameworks stems from the different sensitivities of the two types of features to image quality. This dual-branch processing architecture maximizes the information value of each frame and avoids the loss of temporal information caused by directly discarding interfering frames.
[0056] Specifically, please refer to Figure 3 As shown, it is a logic flowchart for determining whether the welding state is abnormal according to an embodiment of the present invention. The process of determining whether the welding state is abnormal includes: The offset homing coefficient is compared with the preset homing coefficient reference value, and the absolute value of the timing performance coefficient is compared with the preset timing performance reference value. If the offset coefficient is greater than the reference value of the offset coefficient, and the absolute value of the timing performance coefficient is less than or equal to the reference value of the timing performance, then the welding condition is considered normal. If the offset unidirectional coefficient is less than or equal to the unidirectional coefficient reference value, or the absolute value of the timing performance coefficient is greater than the timing performance reference value, then the welding condition is determined to be abnormal.
[0057] It is understandable that in the stable welding process of thick-walled square tubes, there is a definite coupling relationship between the welding torch alignment and the spatial distribution of heat input. When the welding torch points to the weld center, the arc heat input is symmetrically distributed on both sides of the bevel, the geometric center of the molten pool coincides with the weld centerline, and the temperatures of the left and right heat-affected zones are similar. When the welding torch shifts laterally, the arc is closer to one side wall, the geometric center of the molten pool on that side shifts accordingly, and the heat-affected zone on that side receives more heat, resulting in an increase in grayscale on that side. Therefore, the sign of the molten pool position shift should be the same as the sign of the difference in grayscale distribution in the heat-affected zone. The offset direction coefficient reflects the proportion of frames where the signs are the same. When the offset direction coefficient is greater than the reference value, it indicates that the welding torch offset direction is consistent with the asymmetric direction of the thermal field most of the time, the welding system is in a self-consistent state, and there are no external interferences such as heat dissipation asymmetry or material thermal conductivity anisotropy. The change in welding torch position causes an almost instantaneous change in the geometry of the molten pool, while heat conduction from the molten pool to the heat-affected zone requires a certain thermal diffusion time. Therefore, the change in the molten pool offset corresponding to the first time-series trajectory should precede the change in the grayscale difference in the heat-affected zone corresponding to the second time-series trajectory. The absolute value of the timing performance coefficient is less than or equal to the preset reference value, indicating that the time delay between the two trajectories conforms to the normal heat conduction law, and that the image acquisition and data processing systems are well synchronized. When both of the above conditions are met simultaneously, it means that the welding process possesses both spatial self-consistency and temporal synchronization, i.e., the welding torch alignment and heat input symmetry are well matched, and the thermal response delay is within the normal physical range. Therefore, the welding state is judged to be normal. Conversely, if the offset symmetry coefficient is lower than the reference value, it indicates a contradictory phenomenon where the welding torch misalignment and the asymmetric direction of the thermal field are inconsistent, which may be due to asymmetrical heat dissipation or abnormal material thermal conductivity. If the absolute value of the timing performance coefficient exceeds the reference value, it indicates that the thermal response delay is too large or is negative, which may be caused by sensor synchronization abnormalities or data acquisition failures. In these cases, it is judged as an abnormal state, and corresponding correction or alarm operations need to be performed according to the specific abnormality type.
[0058] In the implementation of this invention, for thick-walled square tubes with a wall thickness of 6 to 12 mm, according to a large number of normal welding tests, when the welding process is stable and there is no heat dissipation interference, the value range of the offset unidirectional coefficient is [0.7, 0.95]. Optionally, the reference value of the unidirectional coefficient can be set to 0.7; the timing performance reference value is set to 3 frames, and the timing performance reference value is set as the maximum physical delay of the response of the heat-affected zone under several standard heat inputs.
[0059] Specifically, the process of determining the output content of the instruction includes: If the offset unidirectional coefficient is less than or equal to the unidirectional coefficient reference value, and the absolute value of the timing performance coefficient is less than or equal to the timing performance reference value, then the welding torch is output with a correction command pointing in the opposite direction based on the positive or negative result of the average position offset within the sliding time window. If the offset homing coefficient is greater than the homing coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, an alarm prompt for sensor synchronization abnormality will be output. If the offset sync coefficient is less than or equal to the sync coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, then only a sensor synchronization abnormality alarm will be output, and the correction command will not be executed temporarily.
[0060] When the offset sync coefficient is less than or equal to the sync coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, only a sensor synchronization abnormality alarm is output, and the correction command is not executed temporarily. The reason is that timing mismatch may mean insufficient data reliability, and the average offset calculated based on unreliable data may be invalid. After the synchronization abnormality is eliminated, the offset sync coefficient will be re-evaluated and a decision will be made on whether to correct the offset.
[0061] In this invention, the correction command is sent to the welding torch servo controller in the form of an analog voltage signal or a digital bus signal. After receiving the command, the controller drives the slide to move according to the bias direction carried in the command and the calculated bias amount. This is a common signal control method in the field of control, and will not be described in detail here.
[0062] Understandably, when the offset alignment coefficient does not meet the requirements, it indicates that the main problem lies in the asymmetry and mismatch between the welding torch direction and the thermal field, possibly due to welding torch position deviation. Therefore, outputting a reverse correction command is the most direct and effective adjustment action. When the timing performance coefficient does not meet the requirements, welding parameters should not be adjusted blindly. Instead, an alarm should be triggered to prompt the operator to check sensor synchronization or data acquisition links. This improves the intelligence level and fault diagnosis accuracy of the automated welding system.
[0063] In a specific embodiment, the correction instruction in the opposite direction is: pre-calculate the average value D of the interpolation offset. av If D av>0 indicates that the welding torch is biased to the right of the workpiece. In this case, the welding torch should be moved to the left to correct the offset; if D av A value <0 indicates that the welding torch is biased to the left of the workpiece, in which case the torch should be moved to the right. Each command corresponds to a fixed small movement, with a preset step size of 0.2mm. For example, the correction command is sent to the welding torch servo controller as a digital switch signal. The controller drives the welding torch to move laterally by one step for each pulse received. The minimum time interval between two consecutive commands is 1 second to prevent physical oscillation of the welding torch. If D... av If the sign changes, the next move command is cancelled.
[0064] The dual-branch processing framework in this invention does not rely on a neural network trained with a large amount of labeled data, but is a framework based on deterministic image processing and temporal analysis algorithms: the first branch uses Canny edge detection and first-order moment calculation to extract the offset; the second branch uses image region segmentation and grayscale statistics to extract the difference; the offset direction coefficient and cross-correlation calculation are both based on deterministic mathematical formulas. Therefore, this solution does not require pre-training of the model and can be directly deployed and run on the computer controller at the welding site.
[0065] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the thick-walled square tube welding and forming method provided in the above embodiment.
[0066] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0067] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for welding and forming thick-walled square tubes, characterized in that, include: Images of the molten pool during the welding process of thick-walled square tubes are continuously acquired to form an image time sequence. Based on the inter-frame grayscale jump analysis results of the image time sequence, non-interference frames and interference frames are identified. The image time sequence is input into a dual-branch processing framework. The first branch processing framework extracts the melt pool position offset frame by frame for non-interference frames and performs linear interpolation on the time of interference frames to form a first time trajectory. The second branch processing framework calculates the gray-scale distribution difference of the heat-affected zone frame by frame for all frames to form a second time trajectory. Within a sliding time window, a correlation index is calculated between the position offset and the gray-scale distribution difference. The correlation index includes an offset unidirectional coefficient and a temporal performance coefficient. The offset unidirectional coefficient is calculated based on the positive and negative characteristics of the position offset and the gray-scale difference. The temporal performance coefficient is determined based on the correlation peak value between the first temporal trajectory and the second temporal trajectory. Based on the associated indicators, it is determined whether the welding status is abnormal, and in response to the determination result of abnormal welding status, the instruction output content is determined, including the correction instruction for the welding torch and the abnormal alarm prompt of the sensor.
2. The method for welding and forming thick-walled square tubes according to claim 1, characterized in that, The process of identifying non-interference frames includes: Calculate the grayscale jump value between adjacent frames in an image time sequence; The grayscale jump value is compared with a preset grayscale jump threshold. Frames with grayscale jump values less than or equal to the grayscale jump threshold are marked as non-interference frames, and frames with grayscale jump values greater than the grayscale jump threshold are marked as interference frames.
3. The method for welding and forming thick-walled square tubes according to claim 2, characterized in that, The first branch processing framework extracts the melt pool position offset frame by frame from the non-interference frames, including: Edge detection is performed on the molten pool image in the non-interference frame to extract the geometric center coordinates of the molten pool edge contour in the molten pool image; Calculate the pixel deviation distance between the geometric center coordinates and the weld centerline, and determine the pixel deviation distance as the molten pool position offset.
4. The method for welding and forming thick-walled square tubes according to claim 3, characterized in that, The process of forming the first time-series trajectory by linear interpolation of the interference frame time includes: For any time t that is identified as an interfering frame i Obtain the time t of the most recent non-interference frame before the interference frame. a The corresponding first position offset, and the time t of the nearest non-interference frame after the interference frame is obtained. b The corresponding second position offset; Calculate time t i interpolation offset D i The calculated interpolation offset is filled into the position of the corresponding time in the first time series trajectory to form a continuous first time series trajectory.
5. The method for welding and forming thick-walled square tubes according to claim 1, characterized in that, The process of calculating the grayscale distribution difference of the heat-affected zone in the molten pool image of non-interference frames includes: The heat-affected zone is divided into a left heat-affected zone and a right heat-affected zone, with the weld centerline as the boundary. Calculate the average gray value of the left heat-affected zone and the average gray value of the right heat-affected zone respectively; The difference between the average gray value on the left and the average gray value on the right is defined as the gray distribution difference.
6. The method for welding and forming thick-walled square tubes according to claim 5, characterized in that, The process of calculating the difference in grayscale distribution of the thermally affected region in the melt pool image of the interfering frame includes: For any time frame marked as an interference frame, obtain the first gray-scale distribution difference corresponding to the nearest non-interference frame before the interference frame and the second gray-scale distribution difference corresponding to the nearest non-interference frame after the interference frame; The weighted sum of the first gray-level distribution difference and the second gray-level distribution difference is taken as the gray-level distribution difference at that time of the interference frame. The sum of the weighting coefficients of the first gray-scale distribution difference and the second gray-scale distribution difference is 1, and frames with closer temporal distances are assigned larger coefficients.
7. The method for welding and forming thick-walled square tubes according to claim 6, characterized in that, The calculation process of the offset homing coefficient includes: Within the sliding time window, the number of frames where the numerical signs of the statistical position offset and the grayscale distribution difference are the same. The ratio of the number of frames with the same symbol to the total number of frames in the window is calculated, and the ratio is determined as the offset direction coefficient.
8. The method for welding and forming thick-walled square tubes according to claim 6, characterized in that, The calculation process of the time series performance coefficient includes: The first and second time-series trajectories within the sliding time window are normalized respectively, and the cross-correlation function of the two normalized trajectories is calculated. The number of lag frames corresponding to the peak value of the cross-correlation function is extracted and determined as the time-series performance coefficient.
9. The method for welding and forming thick-walled square tubes according to claim 1, characterized in that, The process of determining whether the welding condition is abnormal includes: The offset homing coefficient is compared with the preset homing coefficient reference value, and the absolute value of the timing performance coefficient is compared with the preset timing performance reference value. If the offset coefficient is greater than the reference value of the offset coefficient, and the absolute value of the timing performance coefficient is less than or equal to the reference value of the timing performance, then the welding condition is considered normal. If the offset unidirectional coefficient is less than or equal to the unidirectional coefficient reference value, or the absolute value of the timing performance coefficient is greater than the timing performance reference value, then the welding condition is determined to be abnormal.
10. The method for welding and forming thick-walled square tubes according to claim 9, characterized in that, The process of determining the output content of an instruction includes: If the offset unidirectional coefficient is less than or equal to the unidirectional coefficient reference value, and the absolute value of the timing performance coefficient is less than or equal to the timing performance reference value, then the welding torch is output with a correction command pointing in the opposite direction based on the positive or negative result of the average position offset within the sliding time window. If the offset homing coefficient is greater than the homing coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, an alarm prompt for sensor synchronization abnormality will be output. If the offset sync coefficient is less than or equal to the sync coefficient reference value, and the absolute value of the timing performance coefficient is greater than the timing performance reference value, then only a sensor synchronization abnormality alarm will be output, and the correction command will not be executed temporarily.
Citation Information
Patent Citations
Method for automatically judging and accepting aluminum alloy welding and repairing defects based on deep learning
CN119693332A
