Water inlet pipe welding method of stainless steel centrifugal pump
By using control systems and image processing technology, precise welding of the stainless steel centrifugal pump inlet pipe to the pump body was achieved, solving the problem of low welding quality in robotic arm welding and improving welding efficiency and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANFANG PUMP IND CO LTD
- Filing Date
- 2023-11-17
- Publication Date
- 2026-07-03
AI Technical Summary
The existing centrifugal pump has problems with misalignment and poor welding quality during the welding process between the inlet pipe and the pump body. In particular, it is difficult to accurately obtain the position of the butt joint and spot weld in the automatic welding of the robotic arm, which leads to a decline in welding quality.
By employing a control system, wire feeding mechanism, and welding arm, combined with a CCD camera and image processing algorithms, and through multiple spot welding and circumferential welding, the coordinates of the butt joint and spot welding points are accurately obtained. The welding gun position and wire feeding speed are then adjusted to achieve smooth welding of the stainless steel centrifugal pump.
It improves welding efficiency and quality, solves the problems of molten pool overlap and image degradation during welding, and ensures the flatness and strength of the weld.
Smart Images

Figure CN117340471B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a welding method, specifically a welding method for the inlet pipe of a stainless steel centrifugal pump, belonging to the field of welding technology. Background Technology
[0002] A centrifugal pump is a pump that uses the centrifugal force generated by the rotation of an impeller to transport liquids. The pump body, also called the pump casing, is the main body of the pump, providing support and stability, and is connected to the bracket for mounting bearings. The pump body has an inlet and an outlet, both of which are fixed to the inlet and outlet pipes by welding. Currently, the assembly of the pump body and inlet pipe of existing centrifugal pumps is generally done by interference fit. Specifically, the assembly of the pump body and inlet pipe is done by press-fitting with a punch press. Simple tooling is used during press-fitting, making it difficult to guarantee dimensional accuracy. After press-fitting, the pump body is then transported to the corresponding welding station for manual welding. The existing welding process suffers from the problem of misalignment between the inlet pipe and the pump body during component handling, leading to poor welding quality. To address this, the applicant developed a technology for automated welding of the pump body and inlet pipe using a robotic arm. This technology simulates manual welding, first performing multi-point spot welding on the joint between the pump body and the inlet pipe, followed by circumferential welding. While manual welding is inefficient, experience and manual adjustments based on the path of the joint ring or the spot welding position can ensure weld smoothness. However, in automated robotic welding, the joint between the pump body and the inlet pipe is located on the curved sidewall of the pump body, and there is also the issue of a spot weld pool. If the path of the joint and the spot welding point positions can be accurately obtained during the subsequent circumferential welding process, precise welding of the joint on the curved sidewall can be achieved. This also solves the problem of repeated circumferential welding through the spot weld pool, which causes the spot weld pool to melt at high temperatures and change its shape, thus affecting the welding quality between the pump body and the inlet pipe. Summary of the Invention
[0003] The purpose of this invention is to provide a welding method for the inlet pipe of a stainless steel centrifugal pump. This invention not only enables automatic welding of the pump body and the inlet pipe, but also accurately obtains the path of the butt joint and the location of the spot welds during the welding process, achieving precise welding of the butt joint and solving the problem of repeated spot welding affecting welding quality.
[0004] The technical solution of the present invention is as follows: a welding method for the inlet pipe of a stainless steel centrifugal pump, comprising a control system, a wire feeding mechanism, a welding movable arm and a pump body clamping mechanism, wherein a welding torch is provided at the front end of the welding movable arm, and the welding wire of the wire feeding mechanism is connected to the welding torch; characterized in that: the control system is connected to the wire feeding mechanism, the welding movable arm and the pump body clamping mechanism respectively; a CCD camera connected to the control system is also provided at the front end of the welding movable arm.
[0005] The method includes the following steps;
[0006] Step 1: The pump body clamping mechanism fixes the pump body and water inlet pipe to be welded. The welding gun performs multiple spot welds on the joint between the water inlet of the stainless steel centrifugal pump body and the water inlet pipe. The weld points are evenly distributed around the circumference of the water inlet.
[0007] Step 2: The pump body clamping mechanism drives the pump body to rotate, and the CCD camera captures the molten pool image including the butt joint and multiple spot welds. The molten pool image is converted to grayscale and then dehazed. The area around the molten pool is divided into regions of interest on the image after dehazing, and then this region of interest is cropped.
[0008] Step 3: Input the captured image into the image denoising and enhancement algorithm for denoising, and then perform edge detection; at the same time, input the captured image into the target detection algorithm to analyze and calculate the area and shape of the molten pool; obtain the center coordinates of the molten pool based on the obtained edge, area and shape of the molten pool, and then obtain the coordinates of the butt joint and multiple spot welds based on the center coordinates of the molten pool to establish the molten pool coordinate system;
[0009] Step 4: Drive the welding torch of the welding arm to perform circumferential welding on the joint between the pump body inlet and the inlet pipe. During the circumferential welding process, adjust the position of the welding torch on the welding arm, the wire feeding speed of the wire feeding mechanism and / or the rotation speed of the pump body clamping mechanism according to the coordinate system of the molten pool to achieve a smooth welding between the stainless steel centrifugal pump body and the inlet pipe.
[0010] In the above-mentioned welding method for the inlet pipe of the stainless steel centrifugal pump, during the process of obtaining the center coordinates of the molten pool based on the obtained edge, area and shape of the molten pool, it is determined whether the molten pool is circular. If it is circular, the coordinates of the center are marked; if it is not circular, the coordinates of its geometric center are marked.
[0011] The specific steps of the demisting treatment in the aforementioned stainless steel centrifugal pump inlet pipe welding method are as follows:
[0012] Step 2.1: Define the dark channel of the image: Calculate all local minimum pixels in the molten pool image to form a grayscale image. Calculate the grayscale value of each channel to obtain the dark channel of the original image, using the following formula:
[0013] ;
[0014] In the formula: Dark channel image; Represents any given image; Represents a pixel; Indicated by A local window centered on the user; Indicates a local area. Representing an image One of the three channels;
[0015] Step 2.2: Determine the model for smoke imaging:
[0016] ;
[0017] In the formula: Indicates the current image grayscale; Indicates the grayscale of a fog-free image. It is the global atmospheric light value; It is transmittance;
[0018] Step 2.3: Calculate the parameter values of the smoke imaging model:
[0019] 2.3.1 Estimating Global Atmospheric Light Values: By traversing the dark channels of the image, the pixels with the highest grayscale values in the top 0.1% are selected. Then, the pixel values of the three channels in the original molten pool image containing the pixel with the highest grayscale value in the dark channel are summed, and the mean of these pixels is calculated as the estimated global atmospheric light value. ;
[0020] 2.3.2 Finding the minimum value: For the original molten pool image... Local minima operation and normalization to find the minimum value:
[0021] ;
[0022] In the formula: Represents the original image. This represents the estimated global atmospheric light value; Indicates in a local window Transmittance;
[0023] 2.3.3 Determine the transmittance:
[0024] ;
[0025] Step 2.4, Guided Filtering:
[0026] ;
[0027] In the formula: The output image is filtered to guide the filtering process. For guiding images; and In pixels The neighborhood centered The constant coefficients;
[0028] Using cost function The cost function that minimizes the deviation between the filtered image and the input image is expressed as:
[0029] ;
[0030] In the formula: For regularization parameters, For the input image, and Determined by linear regression:
[0031] ;
[0032] In the formula: It is the neighborhood Total number of pixels within; and These are the mean and variance of the guiding image in the neighborhood, respectively; It is the mean of the input image in the neighborhood;
[0033] Using size During the window traversal of the image, the result of each traversal operation is obtained. and Mean:
[0034] ;
[0035] The expression for the output image is:
[0036] ;
[0037] Step 2.5: Restore image brightness based on the smoke imaging model to obtain the dehazed image.
[0038] ;
[0039] In the formula: Represents a dehazed image. This represents the output image of the guided filter. To limit the lower limit of transmittance values;
[0040] Step 2.6: Obtain the morphologically dehazed image:
[0041] ;
[0042] In the formula: Represents the opening operator; This represents the opening operator. Represents the erosion operator; This represents the expansion operator.
[0043] The aforementioned welding method for the inlet pipe of the stainless steel centrifugal pump, wherein the image denoising and enhancement algorithm is an FFAnet network incorporating feature attention (CA); and the edge detection method is as follows:
[0044] Step a: Remove noise using a Gaussian filter: Use a two-dimensional Gaussian function. For two-dimensional images Smoothing and denoising, represented as:
[0045] ;
[0046] In the formula: This represents the image after smoothing and denoising.
[0047] ;
[0048] in: The standard deviation of the Gaussian distribution represents the degree of dispersion of the data.
[0049] Step b: Calculate the gradient magnitude and direction of the noise-removed image using a first-order partial differential equation of a two-dimensional Gaussian function.
[0050] ;
[0051] In the formula: , All are constants. ; ;
[0052] The magnitude and inverse direction of the gradient are then:
[0053] ;
[0054] In the formula: For the intensity information of image edges, This provides information about the direction of the image edges.
[0055] Step c, Non-maximum suppression: Perform non-maximum suppression on the calculated gradient magnitude, quantizing all possible directions into four edge directions: 0°, 135°, 90° and 45°, where the four edge directions correspond to the gradient directions perpendicular to the edge directions;
[0056] Step d, edge connection using the dual threshold algorithm: In the process of determining edge pixels, threshold coefficients TH and TL are set, with a ratio of 2:1 or 3:1; pixels with values greater than TH are marked as edge points, while pixels with values less than TL are not marked; pixels between TH and TL are determined using an 8-connected region, and pixels within the 8-connected region that have the same threshold as TL are marked as edge connection points.
[0057] In the aforementioned welding method for the inlet pipe of a stainless steel centrifugal pump, the target detection algorithm is the YOLOv5 algorithm, and the loss function of the YOLOv5 algorithm is as follows:
[0058] ;
[0059] In the formula: This represents the loss function for object detection; Indicates classification loss; This represents the bounding box regression loss; Indicates confidence loss; , and These are the weighting coefficients, and the confidence loss weights. Take 0.4, and Take 0.3;
[0060] The classification loss uses binary cross-entropy loss, calculated as follows:
[0061] ;
[0062] ;
[0063] in, Indicates the total number of categories. Represents natural numbers starting from 1. This represents the predicted value for the current category. This represents the probability of the current class after the activation function. Indicates the true value of the current category;
[0064] The formula for the bounding box regression loss is as follows:
[0065] ;
[0066] ;
[0067] In the formula: This represents the distance between the center points of the target bounding box and the ground truth bounding box. For the weight function, This is a value used to measure the consistency of the aspect ratio of the target bounding box; The diagonal length of the smallest bounding box that encloses both the target box and the ground truth box; For an IoU term with a single Power parameter; For a single Power parameter.
[0068] The aforementioned welding method for the inlet pipe of a stainless steel centrifugal pump includes a SENet attention mechanism in the YOLOv5 algorithm. This SENet attention mechanism comprises transformation, squeezing, activation, and scaling operations. The transformation operation is a convolution process, resulting in a three-dimensional matrix. The squeezing operation transforms the C feature maps into a 1x1xC sequence of real numbers. The activation operation comprehensively captures channel dependencies. The scaling operation multiplies each value in each channel of the input feature map by a weight value, thereby obtaining a feature map with different levels of attention for different channels.
[0069] The aforementioned welding method for the inlet pipe of the stainless steel centrifugal pump includes a pump body clamping mechanism comprising a tooling base, on which a positioning plate is rotatably mounted; a downward pressing cylinder is provided at the upper end of the tooling base, and an inlet pipe clamping block is connected to the telescopic end of the downward pressing cylinder; and an upward pressing cylinder is provided at the lower end of the tooling base, and a pump body positioning block is connected to the output end of the upward pressing cylinder.
[0070] In the aforementioned welding method for the inlet pipe of the stainless steel centrifugal pump, the positioning plate is provided with multiple flange locking mechanisms around its periphery; the upper end of the tooling base is also provided with an inlet pipe locking mechanism.
[0071] The aforementioned welding method for the inlet pipe of the stainless steel centrifugal pump includes a flange locking mechanism comprising multiple first support columns mounted on a tooling base. The first support columns are arranged in a ring around a positioning disc. A first cylinder is mounted at the front end of each first support column, and a flange locking clamp is mounted at the front end of each first cylinder. The inlet pipe locking mechanism includes a second support column mounted on the upper end of the tooling base. A second cylinder is mounted at the lower end of the second support column, and a locking head is mounted on the telescopic end of the second cylinder. A sleeve is fitted onto the upper end of the inlet pipe clamping block, and an insertion port is provided on the sleeve. An elongated through hole is opened on the telescopic end of the pressing cylinder, and the locking head corresponds to the through hole and the insertion port. The wire feeding mechanism includes two sets of meshing rollers, each roller having multiple wire feeding grooves of different sizes.
[0072] Compared with the prior art, the present invention has the following beneficial effects:
[0073] 1. This invention addresses the problem of overlapping weld pools in spot welding and circumferential welding during machine welding. The pump body clamping mechanism of this invention fixes the pump body and inlet pipe to be welded. The welding torch performs multiple spot welds on the butt joint of the stainless steel centrifugal pump body and the inlet pipe, with the weld points evenly distributed around the circumference of the inlet. Then, a CCD camera captures an image of the molten pool including the butt joint and multiple spot welds. The molten pool image is then processed in the control system to obtain the coordinates of the center of the molten pool. Based on the coordinates of the center of the molten pool, the coordinates of the butt joint and multiple spot welds are obtained, and a molten pool coordinate system is established. Finally, the welding torch on the welding arm performs circumferential welding on the inlet and inlet pipe of the stainless steel centrifugal pump. During the circumferential welding process, the position of the welding torch on the welding arm, the wire feeding speed of the wire feeding mechanism, and / or the rotation speed of the pump body clamping mechanism are adjusted according to the molten pool coordinate system. For example, when welding to the molten pool, the rotation speed of the pump body clamping mechanism is reduced and the wire feeding speed is decreased, so that the circumferential welding process can quickly pass over the spot welded molten pool, achieving a smooth welding of the stainless steel centrifugal pump body and the inlet pipe.
[0074] 2. During welding, the high-energy heat generated by the fusion of the base material and welding wire fills the area near the molten pool with turbid media such as fumes and haze. These media particles reduce the amount of light radiation received by the arc camera from the molten pool area, leading to image degradation and reduced image contrast and color fidelity. Furthermore, uneven heat distribution during welding generates spatter noise, further exacerbating the image quality decline. Therefore, this invention's image dehazing algorithm based on dark channel theory effectively solves the image degradation problem caused by fumes and haze, and utilizes morphological algorithms to effectively filter spatter noise.
[0075] 3. This invention installs the pump body on a positioning plate, then places the inlet pipe on the pump body. The inlet pipe clamping block at the telescopic end of the downward-pressing cylinder and the pump body positioning block at the upper end of the upward-pressing cylinder cooperate to press the inlet pipe into the pump body. Subsequently, the downward-pressing cylinder and the upward-pressing cylinder operate, respectively driving the inlet pipe clamping block and the pump body positioning block away from the pump body inlet, thus achieving the stamping assembly of the pump body and the inlet pipe. After assembly, the control system activates the wire feeding mechanism, the welding movable arm, and the pump body clamping mechanism, moving the welding torch to a suitable position for multiple spot welds. After cooling, the three mechanisms cooperate to form a ring weld on the pump body and the inlet pipe. Therefore, this invention improves the welding operation fixing structure of the pump body, increasing the workpiece's stability and providing space for the welding torch to move, thereby improving welding efficiency and quality. Attached Figure Description
[0076] Figure 1 This is a schematic diagram of the welding device of the present invention;
[0077] Figure 2This is a structural schematic diagram of the wire feeding mechanism, the welding movable arm, and the pump body clamping mechanism;
[0078] Figure 3 This is a schematic diagram of the pump body clamping mechanism;
[0079] Figure 4 This is a schematic diagram of the roller structure in the wire feeding mechanism;
[0080] Figure 5 This is a flowchart illustrating the method in Embodiment 2 of the present invention;
[0081] Figure 6 A flowchart illustrating the process of processing areas of interest;
[0082] Figure 7 Here is the network flowchart for FFAnet;
[0083] Figure 8 This is a schematic diagram of the FA attention mechanism.
[0084] Figure 9 This is the schematic diagram of the SE module;
[0085] Figure 10 Flowchart implemented for the SE module;
[0086] Figure 11 A flowchart illustrating the process of determining the geometric center point of the molten pool;
[0087] Figure 12 This is a schematic diagram showing the position of the center of the molten pool relative to the target welding point;
[0088] Figure 13 A schematic diagram to determine the direction and distance of the welding feed;
[0089] Figure 14 A schematic diagram of welding in the z-direction for adjusting the movement of the welding torch;
[0090] Figure 15 This is a graph showing the relationship between welding current and wire feed speed.
[0091] Figure Labels
[0092] 1. Control system; 2. Wire feeding mechanism; 3. Welding movable arm; 4. Pump body clamping mechanism; 5. CCD camera; 6. Tooling base; 7. Positioning plate; 8. Downward pressing cylinder; 9. Water inlet pipe clamping block; 10. Pump body upward pressing cylinder; 11. Pump body positioning block; 13. First support column; 14. First cylinder; 15. Flange locking clamp; 16. Second support column; 17. Second cylinder; 18. Through locking head; 19. Sleeve; 20. Insertion port; 21. Through hole; 22. Roller; 23. Wire feeding groove. Detailed Implementation
[0093] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this should not be construed as limiting the present invention.
[0094] Example 1: A welding device for the inlet pipe of a stainless steel centrifugal pump, such as... Figure 1 and Figure 2 As shown, it includes a control system 1, a wire feeding mechanism 2, a welding arm 3, and a pump clamping mechanism 4. The control system 1 is a common electrical control system, which integrates corresponding control circuit boards and other electronic devices to process and output corresponding control signals. The welding arm 3 is a multi-degree-of-freedom welding arm, which can be obtained commercially. The wire feeding mechanism 2 provides welding wire for welding in the welding arm 3. In this embodiment, as a preferred solution, such as... Figure 4 As shown, the wire feeding mechanism is equipped with two sets of meshing rollers 22, and the rollers are provided with multiple wire feeding grooves 23 of different sizes; the control system 1 is connected to the wire feeding mechanism 2, the welding movable arm 3, and the pump body clamping mechanism 4 respectively; the wire feeding mechanism 2 is connected to the welding movable arm 3, and a CCD camera 5 is provided at the front end of the wire feeding mechanism 2. The CCD camera 5 is connected to the control system 1, and the CCD camera 5 can be obtained commercially; Figure 3 As shown, the pump body clamping mechanism 4 includes a tooling base 6, on which a positioning plate 7 is rotatably mounted; a downward pressing cylinder 8 is provided at the upper end of the tooling base 6, and the telescopic end of the downward pressing cylinder 8 is connected to an inlet pipe clamping block 9; a pump body upward pressing cylinder 10 is provided at the lower end of the tooling base 6, and the output end of the pump body upward pressing cylinder 10 is connected to a pump body positioning block 11; multiple flange locking mechanisms are provided around the positioning plate 7; an inlet pipe locking mechanism is also provided at the upper end of the tooling base 6; the flange locking mechanism includes a first support column 13 provided on the tooling base 6. The first support column 13 is provided with a first cylinder 14 at its front end, and a flange locking clamp 15 is provided at its front end; the water inlet pipe locking mechanism includes a second support column 16 provided on the upper end of the tooling base 6, a second cylinder 17 provided at the lower end of the second support column 16, and a through locking head 18 provided at the telescopic end of the second cylinder 17; a sleeve 19 is sleeved on the upper end of the water inlet pipe clamping block 9, and an insertion port 20 is provided on the sleeve 19; an elongated through hole 21 is opened on the upper part, and the through locking head 18 corresponds to the through hole 21 and the insertion port 20.
[0095] The device described in this embodiment can realize the assembly and welding of the pump body and the inlet pipe: the pump body is installed on the positioning plate 7, and the first cylinder 14 in the flange locking mechanism drives the flange locking clamp 15 to clamp the pump body and the positioning plate 7. Then, the inlet pipe is placed on the pump body. The inlet pipe clamping block 9 at the telescopic end of the pressing cylinder 8 and the pump body positioning block 11 at the upper end of the pump body pressing cylinder 10 cooperate to press the inlet pipe into the water inlet of the pump body. During this process, the second cylinder 17 in the inlet pipe locking mechanism will drive the through locking head 18 to pass through the through hole 21 and the insertion port 20 to lock the inlet pipe clamping block 9. After the inlet pipe is pressed into the pump body, the flange locking mechanism and the inlet pipe locking mechanism are retracted, and then the pressing cylinder 8 and the pump body positioning block 11 are engaged. The hydraulic cylinder 10 operates, driving the inlet pipe clamping block 9 and the pump body positioning block 11 away from the pump body inlet, thereby achieving the stamping assembly of the pump body and the inlet pipe. After assembly, the control system 1 activates the wire feeding mechanism 2, the welding movable arm 3, and the pump body clamping mechanism 4. First, the welding torch is moved to a suitable position for a first spot weld. Then, the tooling base 6 rotates the positioning plate 7, moving the welding arm sequentially to the second and third welding points for a second and third spot weld. After spot welding and cooling for 3 minutes, the tooling base 6 rotates the positioning plate 7 again, using the wire feeding mechanism 2 to continuously feed wire to the welding movable arm 3, enabling the welding movable arm 3 to perform a ring weld on the pump body and the inlet pipe. After the ring weld, all mechanisms return to their initial positions, and the pump body can be removed to obtain the finished product. Thus, this invention eliminates the handling process, reduces the phenomenon of misalignment between the inlet pipe and the pump body, and enables automatic welding, improving welding efficiency and quality.
[0096] Example 2: This example improves upon the welding method in Example 1. In Example 1, overlapping occurs between machine circumferential welding and spot welding. Therefore, the process of this example is as follows: Figure 5 As shown, firstly, the stainless steel centrifugal pump and inlet pipe of the welding machine are fixed using the pump body clamping mechanism. Then, the welding torch of the welding arm performs three spot welds on the inlet of the stainless steel centrifugal pump and the inlet pipe, with the weld points evenly distributed around the circumference of the inlet. Next, during the rotation of the welding clamping table, a CCD camera captures an image of the molten pool, including the butt joint and the three spot welds. The molten pool image is then processed in the control system to obtain the coordinates of the molten pool center. Based on the coordinates of the molten pool center, the coordinates of the butt joint and multiple spot welds are obtained, and a molten pool coordinate system is established. Finally, the welding torch of the welding arm performs circumferential welding on the inlet of the stainless steel centrifugal pump and the inlet pipe. During the circumferential welding process, the position of the welding torch on the welding arm, the wire feeding speed of the wire feeding mechanism, and / or the rotation speed of the pump body clamping mechanism are adjusted according to the molten pool coordinate system to ensure the quality and flatness of the welding.
[0097] Specifically, in this embodiment, the method includes the following steps;
[0098] Step 1: The pump body clamping mechanism fixes the pump body and water inlet pipe to be welded. The welding gun performs multiple spot welds on the joint between the water inlet of the stainless steel centrifugal pump body and the water inlet pipe. The weld points are evenly distributed around the circumference of the water inlet.
[0099] Step 2: The pump body clamping mechanism drives the pump body to rotate, and the CCD camera captures an image of the molten pool, including the butt joint and multiple spot welds. The molten pool image is converted to grayscale and then dehazed. After dehazing, the area surrounding the molten pool is divided into regions of interest, which are then cropped. This step uses morphological dehazing to reduce interference signals from welding spatter, arc, and fumes. Simultaneously, if the haze exceeds a critical value after dehazing, an alarm system is activated; if the haze is between the critical and critical values, an exhaust fan is activated to assist in dehazing.
[0100] The specific steps of the defogging process are as follows:
[0101] Step 2.1: Define the dark channel of the image: Calculate all local minimum pixels in the molten pool image to form a grayscale image. Calculate the grayscale value of each channel to obtain the dark channel of the original image, using the following formula:
[0102] ;
[0103] In the formula: Dark channel image; Represents any given image; Represents a pixel; Indicated by A local window centered on the user; Indicates a local area. Representing an image One of the three channels;
[0104] Step 2.2: Determine the model for smoke imaging:
[0105] ;
[0106] In the formula: Indicates the current image grayscale; Indicates the grayscale of a fog-free image. It is the global atmospheric light value; It is transmittance;
[0107] Step 2.3: Calculate the parameter values of the smoke imaging model:
[0108] 2.3.1 Estimating Global Atmospheric Light Values: By traversing the dark channels of the image, the pixels with the highest grayscale values in the top 0.1% are selected. Then, the pixel values of the three channels in the original molten pool image containing the pixel with the highest grayscale value in the dark channel are summed, and the mean of these pixels is calculated as the estimated global atmospheric light value. ;
[0109] 2.3.2 Finding the minimum value: For the original molten pool image... Local minima operation and normalization to find the minimum value:
[0110] ;
[0111] In the formula: Represents the original image. This represents the estimated global atmospheric light value; Indicates in a local window Transmittance;
[0112] 2.3.3 Determine the transmittance:
[0113] ;
[0114] Step 2.4, Guided Filtering (A guided filter is a linear filter that filters transmittance to eliminate blockiness and smooth edges. The filter input includes an input image, a guided image, and an output image. The input image and the guided image need to be specified in advance; they can both be the same image. The guided filtered image is a locally linear output):
[0115] ;
[0116] In the formula: The output image is filtered to guide the filtering process. For guiding images; and In pixels The neighborhood centered The constant coefficients;
[0117] Using cost function The cost function that minimizes the deviation between the filtered image and the input image is expressed as:
[0118] ;
[0119] In the formula: For regularization parameters, For the input image, and Determined by linear regression:
[0120] ;
[0121] In the formula: It is the neighborhood Total number of pixels within; and These are the mean and variance of the guiding image in the neighborhood, respectively; It is the mean of the input image in the neighborhood;
[0122] Using size During the window traversal of the image, the result of each traversal operation is obtained. and Mean:
[0123] ;
[0124] The expression for the output image is:
[0125] ;
[0126] Step 2.5: Restore image brightness based on the smoke imaging model to obtain the dehazed image.
[0127] ;
[0128] In the formula: Represents a dehazed image. This represents the output image of the guided filter. To limit the lower limit of transmittance, a value of 0.1 is used;
[0129] Step 2.6: Obtain the morphologically dehazed image:
[0130] ;
[0131] In the formula: Represents the opening operator; This represents the opening operator. Represents the erosion operator; This represents the dilation operator. Erosion and dilation are the most fundamental operations in morphology; the former dissolves the boundaries of an object, while the latter expands them. The opening operation is a compound operation, with the specific order of operations being erosion followed by dilation.
[0132] Subsequently, the area surrounding the molten pool is divided into regions of interest (ROIs) on the dehazed image, and this ROI is then cropped (i.e., the ROI image is obtained). The ROI is a more precise area including the molten pool. Cropping this ROI and then processing it separately eliminates the influence of other background elements, reduces the difficulty of image processing, and improves the accuracy of molten pool edge detection. Figure 6 As shown, the ROI image is obtained as follows: First, the grayscale value of each row of pixels in the grayscale image is obtained on the dehazed image. Then, it is determined whether the grayscale value threshold of the boundary between the molten pool and the non-molten pool is met (which can be set). If it is not met, the non-ROI area is removed. If it is met, the boundary is determined. Then, the ROI area is extracted according to the boundary, thus obtaining the ROI image.
[0133] Step 3: Input the captured image into the image denoising and enhancement algorithm for denoising, and then perform edge detection; at the same time, input the captured image into the target detection algorithm to analyze and calculate the area and shape of the molten pool; obtain the center coordinates of the molten pool based on the obtained edge, area and shape of the molten pool, and then obtain the coordinates of the butt joint and multiple spot welds based on the center coordinates of the molten pool to establish the molten pool coordinate system;
[0134] In this step, the image denoising and enhancement algorithm is an FFAnet network incorporating Feature Attention (CA); such as Figure 7 As shown, the input to the FFA network is a blurred image, which is passed to a shallow feature extraction part and then fed into N group structures with multi-hop connections. This invention fuses the output features of the N group structures together using a proposed feature attention module. Finally, these features are passed to the reconstruction part and the global residual learning structure to obtain a fog-free output. Furthermore, each group structure combines B basic block structures with local residual learning, and each basic block incorporates skip connections and a feature attention (FA) module. Figure 8 , Figure 9 and Figure 10 As shown, Feature Attention (FA) is an attention mechanism structure composed of channel attention and pixel attention. Most current image dehazing networks treat channel and pixel features equally, failing to handle images with uneven haze distributions or weighted channels. Feature Attention, composed of channel and pixel attention, provides additional flexibility when processing different types of information. FA treats different features and pixel regions unequally, offering additional flexibility in handling different types of information and extending the representational capabilities of CNNs.
[0135] Channel Attention (CA) focuses on how different channel features have completely different weighting information for the Channel-Channel Context (DCP). First, global average pooling is used to transform the global spatial information of the channels into channel descriptors:
[0136] ;
[0137] In the formula: Indicates that the c-th channel is in The value of the position; For global pooling functions, the size of the feature map starts from... become To obtain different weights for different channels, the features are then passed through two convolutional layers, a sigmoid activation function, and a ReLU activation function.
[0138] ;
[0139] In the formula: It's the sigmod function. It is the ReLU function;
[0140] Finally, input the elements in order. With channel Multiply the corresponding elements by their weights:
[0141] .
[0142] In this step, the edge detection method is as follows:
[0143] Step a: Remove noise using a Gaussian filter: Use a two-dimensional Gaussian function. For two-dimensional images Smoothing and denoising, represented as:
[0144] ;
[0145] In the formula: This represents the image after smoothing and denoising.
[0146] ;
[0147] in: The standard deviation of the Gaussian distribution represents the degree of dispersion of the data.
[0148] Step b: Calculate the gradient magnitude and direction of the noise-removed image using a first-order partial differential equation of a two-dimensional Gaussian function.
[0149] ;
[0150] In the formula: , All are constants. ; The magnitude and inverse direction of the gradient are then:
[0151] ;
[0152] In the formula: For the intensity information of image edges, This provides information about the direction of the image edges.
[0153] Step c, Non-maximum suppression: Perform non-maximum suppression on the calculated gradient magnitude, quantizing all possible directions into four edge directions: 0°, 135°, 90° and 45°, where the four edge directions correspond to the gradient directions perpendicular to the edge directions; non-maximum suppression is to compare the magnitude of the corresponding neighborhood values in the 3*3 neighborhood along the above four types of gradient directions.
[0154] Step d, edge connection using the dual threshold algorithm: In the process of determining edge pixels, threshold coefficients TH and TL are set, with a ratio of 2:1 or 3:1; pixels with values greater than TH are marked as edge points, while pixels with values less than TL are not marked; pixels between TH and TL are determined using an 8-connected region, and pixels within the 8-connected region that have the same threshold as TL are marked as edge connection points.
[0155] In this step, the target detection algorithm is the YOLOv5 algorithm, and the loss function of the YOLOv5 algorithm is as follows:
[0156] ;
[0157] In the formula: This represents the loss function for object detection; Indicates classification loss; This represents the bounding box regression loss; Indicates confidence loss; , and These are the weighting coefficients, and the confidence loss weights. Take 0.4, and Take 0.3;
[0158] The classification loss uses binary cross-entropy loss, calculated as follows:
[0159] ;
[0160] ;
[0161] in, Indicates the total number of categories. Represents natural numbers starting from 1. This represents the predicted value for the current category. This represents the probability of the current class after the activation function. Indicates the true value of the current category;
[0162] The formula for the bounding box regression loss is as follows:
[0163] ;
[0164] ;
[0165] In the formula: This represents the distance between the center points of the target bounding box and the ground truth bounding box. For the weight function, This is a value used to measure the consistency of the aspect ratio of the target bounding box; The diagonal length of the smallest bounding box that encloses both the target box and the ground truth box; For an IoU term with a single Power parameter; For a single Power parameter, this new loss series is -IoU Loss.
[0166] By adjusting This allows the detector to have greater flexibility in bounding box regression at different levels, when A value greater than 1 helps improve the accuracy of regression for targets with large IoU; specifically as follows:
[0167] when →0
[0168] ;
[0169] when When =1;
[0170] ;
[0171] when When =2;
[0172] ;
[0173] Simultaneously simplify -IoU formula is
[0174] .
[0175] Furthermore, the YOLOv5 algorithm described in this step incorporates the SENet attention mechanism; the SENet attention mechanism (Squeeze-and-Excitation block) includes transformation operations, squeezing operations, excitation operations, and scaling operations; the schematic diagram of the SE module based on the attention mechanism is shown below. Figure 9 As shown in the diagram, the specific implementation of the SE module is as follows: Figure 10 As shown. The transformation operation is a convolution process, resulting in a three-dimensional matrix, corresponding to... Figure 10 The Ftr operation in the middle; the squeeze operation makes the C feature maps eventually become a 1x1xC real number sequence, that is Figure 10 The Global pooling region; the activation operation is used to fully capture channel dependencies; the scaling operation (i.e. Figure 9 F in scale This is used to multiply each value in each channel of the input feature map by a weight value, thereby obtaining a feature map with different attention levels for different channels.
[0176] Based on the obtained edge, area, and shape of the molten pool, determine whether the molten pool is circular. If it is circular, mark the coordinates of the center. If it is not a circle, mark the coordinates of its geometric center. .like Figure 11 As shown, the process for determining the geometric center is as follows:
[0177] First, classify the molten pools according to their shapes:
[0178] If it is a linear shape, then take the coordinates of its midpoint;
[0179] If the image is circular or nearly circular, its center lines are extracted three times. If the three center lines intersect at a unique point or all coincide, the coordinates of that intersection point are obtained and used as the coordinates of the geometric center. If there are two or no intersection points, the ROI region is reduced, and the image center lines are extracted three times again until they intersect at a unique point. Finally, when the image is an irregular polygon, the formula for calculating the geometric center of a polygon is used.
[0180] The geometric center of the polygon ( , ):
[0181] ;
[0182] ;
[0183] in, Let N be the coordinates of the vertices of the polygon, and N be the number of sides of the polygon.
[0184] Step 4: Drive the welding torch of the welding arm to perform circumferential welding on the joint between the pump body inlet and the inlet pipe. During the circumferential welding process, adjust the position of the welding torch on the welding arm, the wire feeding speed of the wire feeding mechanism and / or the rotation speed of the pump body clamping mechanism according to the coordinate system of the molten pool to achieve a smooth welding between the stainless steel centrifugal pump body and the inlet pipe.
[0185] Specifically, when welding to the molten pool, the pump body clamping mechanism is sped down and the wire feed speed is reduced to allow the welding process to quickly pass over the molten pool of the spot weld, ensuring weld quality and smoothness. Specific operations include:
[0186] 1. If the coordinate point is far from the welding point, increase the wire feeding speed and the current; if the coordinate point is close to the welding point, decrease the wire feeding speed.
[0187] 2. The pump body clamping mechanism controls the rotational movement of the welding points:
[0188] Subtracting the coordinates of the molten pool center from the target welding point yields a three-dimensional vector. Projecting this vector onto the xy plane (vertical projection), as shown below... Figure 12 As shown, the rotation radius is determined based on the position of the weld point from the center of the inlet. A circle is drawn with the inlet as the center and the center of the molten pool as the starting point, intersecting the target weld point with a perpendicular line. The blue arc represents the movement distance of the pump body clamping mechanism, thus determining the rotational speed of the pump body clamping mechanism. Figure 13 As shown, the direction and distance of the welding feed are adjusted according to the distance between the arc and the vector.
[0189] like Figure 14 As shown, the circumferential weld is expanded along the inlet as the center (the cylinder is expanded into a plane) through image processing. The x-coordinate of the starting point of the vector is the length of the arc, and the y-coordinate is the welding height, which is adjusted in the z-direction by the movement of the welding torch.
[0190] 3. Current and wire feeding mechanism control.
[0191] The next motion path length can be determined from the molten pool coordinates. Combined with the wire diameter, the wire feeding speed is determined, and thus the current magnitude is determined. The relationship between welding current and wire feeding speed in this embodiment can be found in [reference needed]. Figure 15 .
[0192] In summary, this invention not only enables automated welding of the centrifugal pump body and inlet pipe, but also accurately obtains the path of the butt joint and the position of the spot weld points during the welding process, achieving precise welding of the butt joint and solving the problem of repeated spot welding affecting the welding quality. This invention can also achieve the assembly and welding of the pump body and inlet pipe without the need for handling, reducing the occurrence of misalignment between the inlet pipe and the pump body. Furthermore, it enables automated welding, reducing labor costs and improving welding efficiency, welding quality, and weld smoothness.
Claims
1. A welding method for the inlet pipe of a stainless steel centrifugal pump, comprising a control system (1), a wire feeding mechanism (2), a welding movable arm (3), and a pump body clamping mechanism (4), wherein a welding torch is provided at the front end of the welding movable arm (3), and the welding wire of the wire feeding mechanism (2) is connected to the welding torch; characterized in that: The control system (1) is connected to the wire feeding mechanism (2), the welding movable arm (3) and the pump body clamping mechanism (4) respectively; the front end of the welding movable arm (3) is also provided with a CCD camera (5) connected to the control system. The method includes the following steps; Step 1: The pump body clamping mechanism fixes the pump body and water inlet pipe to be welded. The welding gun performs multiple spot welds on the joint between the water inlet of the stainless steel centrifugal pump body and the water inlet pipe. The weld points are evenly distributed around the circumference of the water inlet. Step 2: The pump body clamping mechanism drives the pump body to rotate, and the CCD camera captures the molten pool image including the butt joint and multiple spot welds. The molten pool image is converted to grayscale and then dehazed. The area around the molten pool is divided into regions of interest on the image after dehazing, and then this region of interest is cropped. Step 3: Input the captured image into the image denoising and enhancement algorithm for denoising, and then perform edge detection; at the same time, input the captured image into the target detection algorithm to analyze and calculate the area and shape of the molten pool; obtain the center coordinates of the molten pool based on the obtained edge, area and shape of the molten pool, and then obtain the coordinates of the butt joint and multiple spot welds based on the center coordinates of the molten pool to establish the molten pool coordinate system; The image denoising and enhancement algorithm is an FFAnet network incorporating feature attention (CA); the edge detection method is as follows: Step a, Gaussian filter to remove noise: a two-dimensional Gaussian function to a two-dimensional image smooth denoising, denoted as: ; In the formula: denotes the smoothed denoised image; ; wherein: is the standard deviation of the Gaussian distribution, representing the degree of dispersion of the data; Step b: Calculate the gradient magnitude and direction of the noise-removed image using a first-order partial differential equation of a two-dimensional Gaussian function. ; wherein: , are constants, ; ; The magnitude and inverse direction of the gradient are then: ; In the formula: For the intensity information of image edges, This provides information about the direction of the image edges. Step c, Non-maximum suppression: Perform non-maximum suppression on the calculated gradient magnitude, quantizing all possible directions into four edge directions: 0°, 135°, 90° and 45°, where the four edge directions correspond to the gradient directions perpendicular to the edge directions; Step d, edge connection using the dual threshold algorithm: In the process of determining edge pixels, threshold coefficients TH and TL are set, with a ratio of 2:1 or 3:1; pixels with values greater than TH are marked as edge points, while pixels with values less than TL are not marked; pixels between TH and TL are determined using an 8-connected region, and pixels within the 8-connected region that have the same threshold as TL are marked as edge connection points. Step 4: Drive the welding torch of the welding arm to perform circumferential welding on the joint between the pump body inlet and the inlet pipe. During the circumferential welding process, adjust the position of the welding torch on the welding arm, the wire feeding speed of the wire feeding mechanism and / or the rotation speed of the pump body clamping mechanism according to the coordinate system of the molten pool to achieve a smooth welding between the stainless steel centrifugal pump body and the inlet pipe.
2. The method of claim 1, wherein: In the process of obtaining the center coordinates of the molten pool based on the obtained edge, area and shape of the molten pool, it is determined whether the molten pool is circular. If it is circular, the coordinates of the center are marked; if it is not circular, the coordinates of its geometric center are marked.
3. The method of claim 1, wherein: The specific steps of the defogging process are as follows: Step 2.1: Define the dark channel of the image: Calculate all local minimum pixels in the molten pool image to form a grayscale image. Calculate the grayscale value of each channel to obtain the dark channel of the original image, using the following formula: ; In the formula: Dark channel image; Represents any given image; Represents a pixel; Indicated by A local window centered on the user; Indicates a local area. Representing an image One of the three channels; Step 2.2: Determine the model for smoke imaging: ; In the formula: Indicates the current image grayscale; Indicates the grayscale of a fog-free image. It is the global atmospheric light value; It is transmittance; Step 2.3: Calculate the parameter values of the smoke imaging model: 2.3.1 Estimating Global Atmospheric Light Values: By traversing the dark channels of the image, the pixels with the highest grayscale values in the top 0.1% are selected. Then, the pixel values of the three channels in the original molten pool image containing the pixel with the highest grayscale value in the dark channel are summed, and the mean of these pixels is calculated as the estimated global atmospheric light value. ; 2.3.2, Minima finding: on the original melt pool image Local minima operation and normalised minima finding: ; wherein: represents the original image, represents the estimated global atmospheric light value; represents the transmission of the local window at the pixel position 2.3.3 Determine the transmittance: ; Step 2.4, Guided Filtering: ; wherein: is the guided filter output image; is the guide image; and a constant factor for the neighborhood centered at the pixel point . Utilizing a cost function The cost function is defined as the sum of the squared differences between the filtered image and the input image. ; In the formula: For regularization parameters, For the input image, and Determined by linear regression: ; where: is the total number of pixels within the neighborhood and are the mean and variance of the guiding image within the neighborhood, respectively; is the mean of the input image within the neighborhood; In the process of traversing the image using a window of size the mean value of each traversal operation and is determined: ; The expression for the output image is: ; Step 2.5: Restore image brightness based on the smoke imaging model to obtain the dehazed image. ; In the formula: denotes the defogged image, denotes the guided filter output image; is a lower limit of the transmittance value. Step 2.6: Obtain the morphologically dehazed image: ; In the formula: Represents the opening operator; This represents the opening operator. Represents the erosion operator; This represents the expansion operator.
4. The method of welding an inlet pipe of a stainless steel centrifugal pump according to claim 1, characterized in that: The target detection algorithm is the YOLOv5 algorithm, and the loss function of the YOLOv5 algorithm is as follows: ; In the formula: This represents the loss function for object detection; Indicates classification loss; This represents the bounding box regression loss; Indicates confidence loss; , and These are the weighting coefficients, representing the confidence loss weights. Take 0.4, and Take 0.3; The classification loss uses binary cross-entropy loss, calculated as follows: ; ; in, Indicates the total number of categories. Represents natural numbers starting from 1. This represents the predicted value for the current category. This represents the probability of the current class after the activation function. Indicates the true value of the current category; The formula for the bounding box regression loss is as follows: ; ; In the formula: This represents the distance between the center points of the target bounding box and the ground truth bounding box. For the weight function, This is a value used to measure the consistency of the aspect ratio of the target bounding box; The diagonal length of the smallest bounding box that encloses both the target box and the ground truth box; For an IoU term with a single Power parameter; For a single Power parameter.
5. The method of welding an inlet pipe of a stainless steel centrifugal pump according to claim 4, characterized in that: The YOLOv5 algorithm incorporates the SENet attention mechanism, which includes transformation, squeezing, activation, and scaling operations. The transformation operation is a convolution process that yields a three-dimensional matrix. The squeezing operation transforms C feature maps into a 1x1xC sequence of real numbers. The activation operation is used to comprehensively capture channel dependencies. The scaling operation is used to multiply each value in each channel of the input feature map by a weight value, thereby obtaining a feature map with different attention to different channels.
6. The method of welding an inlet pipe of a stainless steel centrifugal pump according to any one of claims 1 to 5, characterized in that: The pump body clamping mechanism (4) includes a tooling base (6), on which a positioning plate (7) is rotatably mounted; a downward pressure cylinder (8) is provided at the upper end of the tooling base (6), and a water inlet pipe clamping block (9) is connected to the telescopic end of the downward pressure cylinder (8); a pump body upward pressure cylinder (10) is provided at the lower end of the tooling base (6), and a pump body positioning block (11) is connected to the output end of the pump body upward pressure cylinder (10).
7. The method of welding an inlet pipe of a stainless steel centrifugal pump according to claim 6, characterized in that: The positioning plate (7) is provided with multiple flange locking mechanisms around its periphery; the upper end of the tooling base (6) is also provided with a water inlet pipe locking mechanism.
8. The method of welding an inlet pipe of a stainless steel centrifugal pump according to claim 7, characterized in that: The flange locking mechanism includes multiple first support columns (13) arranged on the tooling base (6), the first support columns (13) being arranged in a ring around the positioning plate, and a first cylinder (14) being provided at the front end of the first support column (13), and a flange locking clamp (15) being provided at the front end of the first cylinder (14); the water inlet pipe locking mechanism includes a second support column (16) arranged at the upper end of the tooling base (6), and a second cylinder (17) being provided at the lower end of the second support column (16), the second cylinder ( 17) The telescopic end is provided with a through locking head (18); the upper end of the water inlet pipe clamping block (9) is fitted with a sleeve (19), and the sleeve (19) is provided with an insertion port (20); the telescopic end of the pressing cylinder (8) is provided with a long strip-shaped through hole (21), and the through locking head (18) corresponds to the through hole (21) and the insertion port (20); the wire feeding mechanism is provided with two sets of mutually meshing rollers (22), and the rollers are provided with multiple wire feeding grooves (23) of different sizes.