A method and system for improving welding gun motion stability based on welding gun posture
Through welding bevel image processing and stereo vision technology, the welding bevel characteristics and the welding torch movement trajectory are identified, which solves the problems of inaccurate positioning of the welding torch and difficulty in trajectory optimization, improves welding efficiency and quality, and ensures the stability and continuous welding process. sex.
Patent Information
- Application Number
- CN202411347834.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-26
AI Technical Summary
When the existing welding torch movement stability is improved, the welding torch positioning is inaccurate and it is difficult to optimize the movement trajectory, resulting in low welding efficiency and increased defects, and the inability to adjust the posture in real time to deal with unstable factors.
By acquiring welding bevel images, identifying key features using classification algorithms and stereo vision technology, calculating three-dimensional coordinates and depth, optimizing the welding torch movement trajectory, and monitoring key parameters in real time to adjust posture and trajectory to ensure the stability and quality of the welding process.
提高了焊接接头质量,减少了由于轨迹不当造成的缺陷,增强了焊接效率和灵活性,确保了焊接过程的稳定性和连续性,及时发现并处理异常情况,减少了调整和修复时间。
Smart Images

Figure CN118864471B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of welding equipment, and in particular to a method and system for improving the motion stability of a welding gun based on welding gun posture. Background Art
[0002] In modern industry, there is a significant reliance on large equipment, especially under extreme or special working conditions. If the key components of these equipment are damaged, it will not only affect production efficiency, but may also cause major safety hazards. In order to meet this challenge, Additive Repair Technology came into being. This technology takes the damaged parts as the core, and by accumulating materials layer by layer, it not only restores the original size of the parts, but also restores or even improves their performance. The digitalization and rapid prototyping characteristics of this method make it particularly important in on-site emergency repairs.
[0003] In additive repair technology, the use of welding guns is a key link, and the stability of welding guns directly affects the accurate deposition and forming quality of materials during the repair process. By accurately controlling and adjusting the posture of the welding gun in real time, the accuracy and stability of the welding process can be significantly improved, thereby ensuring the uniformity of the repair layer and the mechanical properties of the parts. When the existing welding gun movement stability is improved, the positioning of the welding gun is inaccurate, which is not convenient for the precise alignment of the welding gun during welding, and it is not convenient to optimize the movement trajectory of the welding gun, thereby reducing the welding efficiency and increasing the defects caused by improper trajectory. At the same time, it is not easy to combine the real-time posture adjustment of the welding gun by monitoring the key parameters in the welding process, which leads to unstable factors in the welding process.
[0004] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention proposes a method and system for improving the motion stability of a welding gun based on the welding gun posture, which solves the problem that when the existing welding gun motion stability is improved as proposed in the above background technology, the positioning of the welding gun is inaccurate, which is not convenient for accurate alignment of the welding gun during welding, and is not convenient for optimizing the motion trajectory of the welding gun, thereby reducing the welding efficiency and increasing the defects caused by improper trajectory. At the same time, it is not convenient to monitor the key parameters in the welding process, which makes it inconvenient to combine the real-time posture adjustment of the welding gun, thereby causing the problem of unstable factors in the welding process.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0007] According to one aspect of the present invention, a method for improving the motion stability of a welding gun based on a welding gun posture is provided. The method for improving the motion stability of a welding gun based on a welding gun posture comprises the following steps:
[0008] S1, obtaining a welding groove image, and preprocessing the welding groove image to obtain a welding groove feature image;
[0009] S2. Use classification algorithm to analyze the welding groove feature image and identify the key features of the welding groove;
[0010] S3. Based on key features, the three-dimensional coordinates of the weld are obtained using stereo vision technology, and the depth of the welding groove is calculated;
[0011] S4, based on the three-dimensional coordinates of the weld and the depth of the welding groove, obtain the real-time posture of the welding gun, and adjust the movement trajectory of the welding gun through the optimization algorithm;
[0012] S5. Real-time monitoring of key parameters in the welding process, analysis of key parameters through analysis algorithms, and evaluation of weld formation quality;
[0013] S6. Based on the evaluation results, determine whether the key parameters exceed the preset range, and adjust the key parameters or issue a warning.
[0014] Further, obtaining the welding groove image and preprocessing the welding groove image to obtain the welding groove feature image includes the following steps:
[0015] S11, removing noise in the welding groove image by using a Gaussian filter;
[0016] S12, correcting the brightness and color deviation of the welding groove image after noise removal;
[0017] S13, enhancing the contrast and clarity of the corrected welding groove image by image processing technology;
[0018] S14, extracting an image sequence from the welding groove image after enhancing contrast and clarity, and graying each frame of the image in the image sequence to obtain a grayscale image;
[0019] S15, using the Sobel operator to calculate the edge gradient of each pixel in the grayscale image;
[0020] S16, using a local gradient mean method to locally screen and enhance edge gradients, and filtering edge gradients through a threshold to obtain a gradient image;
[0021] S17, representing the welding groove image by calculating the ordered feature vector of the area through the Euclidean distance;
[0022] S18, performing thinning and binarization processing on the gradient image, marking the pixel points whose gradient values are greater than the threshold as edge points;
[0023] S19, connecting adjacent edge points into a connected domain, and obtaining a final edge image as a welding groove feature image.
[0024] Furthermore, the classification algorithm is used to analyze the welding groove feature image and identify the key features of the welding groove, including the following steps:
[0025] S21, setting relevant parameters, and generating a preliminary welding groove feature image and a corresponding feature trend matrix based on the relevant parameters;
[0026] S22, calculating the fitness function value of the preliminary welding groove feature image;
[0027] S23, calculating the group fitness variance of all welding groove feature images, if the preset conditions are met, mutation occurs and the process goes to step S25; otherwise, the process goes to step S24 for optimization;
[0028] S24, updating the inertia weight point according to the inertia weight calculation formula, and updating the change trend and position of the welding groove feature image according to the change trend update formula and the position update formula respectively;
[0029] S25, check whether the termination condition is met, if it is met, then end the optimization process; otherwise, return to step S22 to continue the optimization;
[0030] S26, assigning the found optimal parameter vector to the classification model;
[0031] S27, inputting the processed welding groove feature image into the classification model, and training the classification model to obtain a trained classification model;
[0032] S28, using the trained classification model to classify the new welding groove feature image, obtaining the final welding groove classification result, and stopping the calculation;
[0033] S29. Identify the key features of the welding groove through the final welding groove classification results.
[0034] Further, the new welding groove feature image is classified using the trained classification model to obtain the final welding groove classification result, and the calculation is stopped, including the following steps:
[0035] S281, using the trained classification model to analyze the new welding groove feature image, and predicting the welding groove category probability corresponding to each welding groove feature image;
[0036] S282, setting a confidence threshold, screening the probability of each category to which each welding groove feature image belongs, eliminating the prediction results below the confidence threshold, and determining the category label of each welding groove feature image from the probability output by the classification model according to the classification threshold;
[0037] S283. The screened and determined category labels are used as the final welding groove classification results, and the calculation process ends.
[0038] Furthermore, the inertia weight calculation formula is:
[0039] ;
[0040] in, G Expressed as inertia weight;
[0041] G max , G min Respectively represent the starting value and ending value of the inertia weight;
[0042] D Represents the current iteration number;
[0043] D max Expressed as the maximum number of iterations.
[0044] Furthermore, based on the three-dimensional coordinates of the weld and the depth of the welding groove, the real-time posture of the welding gun is obtained, and the motion trajectory of the welding gun is adjusted by an optimization algorithm, including the following steps:
[0045] S41, determining the number of different welding gun motion trajectories during the welding process, and setting the maximum number of iterations and parameter adjustment probability of the welding process;
[0046] S42, generating a preliminary welding gun motion trajectory of the welding gun using a heuristic algorithm;
[0047] S43, calculating the fitness value of each welding gun motion trajectory, and recording the best and second best welding gun motion trajectory states;
[0048] S44, using a random update strategy to adjust the welding gun motion trajectory, and repeating step S43;
[0049] S45, retaining the current welding gun motion trajectory or adopting a new welding gun motion trajectory according to a specific criterion formula, and repeating step S43;
[0050] S46, mutating the welding path by using the grey wolf algorithm, and repeating step S43;
[0051] S47, loop iterate, and execute steps S44 to S46 until a predetermined iteration termination condition is met;
[0052] S48. After the iteration is completed, the global optimal solution is output as the welding gun motion trajectory.
[0053] Furthermore, the specific criterion formula is:
[0054] ;
[0055] in, Expressed as n After +1 iteration, i A new state of the welding gun motion trajectory;
[0056] Expressed as n At the beginning of the iteration, i The current status of the welding gun motion trajectory;
[0057] In each iteration, i The update step size of the welding gun motion trajectory;
[0058] Expressed as i The best historical state of the welding gun movement trajectory;
[0059] and They are respectively represented as the global best historical state and the global second best historical state in all welding gun motion trajectories;
[0060] o 1. o 2. o 3 represent the learning factors of the best historical state of the welding gun motion trajectory, the best global historical state, and the second best global historical state.
[0061] Furthermore, real-time monitoring of key parameters in the welding process, analyzing the key parameters through analytical algorithms, and evaluating the quality of weld formation include the following steps:
[0062] S51, obtaining the number of all key parameters in the welding process as the number of cluster centers, clustering all parameter data collected in the welding process, and dividing the welding process into multiple operation modes or state groups;
[0063] S52, extracting key data points from each welding process state group;
[0064] S53, using a detection algorithm to calculate outlier factors of key data points to identify data points that deviate from a normal welding state;
[0065] S54, recording the number of outliers in each state group, and calculating the proportion of outliers in each welding state group;
[0066] S55, setting a preset threshold value of the outlier ratio. If the outlier ratio in the welding state group exceeds the preset threshold value, it is determined that the welding state group has abnormal welding behavior, and all relevant welding points or time periods of the welding state group are marked as abnormal areas.
[0067] S56, comparing parameter data of the welding point or time period marked as an abnormal area with parameters of a preset welding state to determine the quality of weld formation.
[0068] Further, obtaining the number of all key parameters in the welding process as the number of cluster centers, clustering all parameter data collected in the welding process, and dividing the welding process into multiple operation modes or state groups includes the following steps:
[0069] S511. Standardize all key parameters in the welding process to ensure that the value ranges between different features are consistent;
[0070] S512, meshing the feature space of all key parameters in the welding process with preset meshing parameters to establish a mapping relationship between data points and corresponding meshes;
[0071] S513, constructing a grid density matrix based on grid division, and using it to represent the density of data points in different grids;
[0072] S514, repeatedly performing mesh division by adjusting mesh division parameters to find the best density level division;
[0073] S515, hierarchically classifying the importance characteristics of all key parameters in the welding process according to the constructed grid density matrix, and determining the importance of different levels;
[0074] S516, starting from the highest density level, removing the grid unit with the highest density, and calculating the clustering algorithm parameters of the current density level according to the equivalent rule, and performing a clustering operation;
[0075] S517, randomly selecting data points in the grid cells with the highest density, expanding the class, and clustering based on the high density threshold and the low density threshold;
[0076] S518, repeating steps S514 and S515 to perform clustering until clustering of the lowest density threshold is completed;
[0077] S519. According to the clustering result, the welding process is divided into a plurality of operation modes or state groups.
[0078] According to another aspect of the present invention, a welding gun motion stability improvement system based on welding gun posture is also provided, and the welding gun motion stability improvement system based on welding gun posture includes:
[0079] An image acquisition and processing module is used to acquire a welding groove image and pre-process the welding groove image to obtain a welding groove feature image;
[0080] Image analysis and feature recognition module, used to analyze the welding groove feature image using classification algorithm and identify the key features of the welding groove;
[0081] Stereo vision technology module, which is used to obtain the three-dimensional coordinates of the weld based on key features and calculate the depth of the welding groove using stereo vision technology;
[0082] The posture acquisition and trajectory optimization module is used to obtain the real-time posture of the welding gun based on the three-dimensional coordinates of the weld and the depth of the welding groove, and adjust the movement trajectory of the welding gun through the optimization algorithm;
[0083] Data analysis and evaluation module, which is used to monitor the key parameters in the welding process in real time, analyze the key parameters through analytical algorithms, and evaluate the quality of weld formation;
[0084] The result judgment and adjustment control module is used to judge whether the key parameters exceed the preset range according to the evaluation results, and adjust the key parameters or issue a warning;
[0085] Among them, the image acquisition and processing module is connected with the stereoscopic vision technology module through the image analysis and feature recognition module, the stereoscopic vision technology module is connected with the data analysis and evaluation module through the posture acquisition and trajectory optimization module, and the data analysis and evaluation module is connected with the result judgment and adjustment control module.
[0086] The beneficial effects of the present invention are:
[0087] 1. The present invention makes the positioning of the welding gun more accurate by acquiring high-resolution welding groove images and three-dimensional coordinate information, ensures the accurate alignment of the welding gun during the welding process, thereby improving the quality of the welded joint, and can adjust the motion trajectory of the welding gun through an optimization algorithm according to the three-dimensional coordinates of the weld and the depth information of the welding groove, which not only improves the welding efficiency but also reduces the defects caused by improper trajectory. At the same time, by real-time monitoring of key parameters in the welding process and combining real-time posture adjustment of the welding gun, it can effectively deal with unstable factors occurring in the welding process, so that the formation quality of the weld can be evaluated in real time, which not only provides timely quality control but also provides data support for the continuous improvement of the welding process.
[0088] 2. The present invention analyzes the characteristic image of the welding groove through a classification algorithm, so that by setting relevant parameters, a characteristic image and a characteristic trend matrix of the welding groove are generated, which helps to more accurately adjust the welding gun posture and ensure the accuracy and stability of the welding process. By calculating the fitness function value and the group fitness variance, it can dynamically adapt to different welding conditions and environments, improve the flexibility and efficiency of the welding process, and assign the optimal parameter vector to the classification model and obtain an efficient classification model through a training process, so that the welding gun can be automatically adjusted according to real-time data in actual operation, improve the welding quality and efficiency, and at the same time, by setting the confidence threshold and the classification threshold, it helps to eliminate uncertain prediction results and reduce errors, so that different types of welding grooves can be more accurately identified, and the overall quality of the welding process can be improved. Furthermore, by accurately identifying and classifying the characteristics of the welding groove, the movement of the welding gun can be more effectively controlled, ensuring the stability and continuity of the welding process, and reducing welding defects caused by improper posture.
[0089] 3. The present invention adjusts the motion trajectory of the welding gun through an optimization algorithm, so that by optimizing the motion trajectory of the welding gun, the relative position and angle between the welding gun and the weld can be more accurately controlled, thereby improving the accuracy of the welding seam. By using optimization techniques such as heuristic algorithms and gray wolf algorithms, the motion trajectory of the welding gun can dynamically adapt to different welding conditions, improve adaptability and optimization effects, and reduce welding defects caused by improper welding gun posture by accurately controlling the motion trajectory of the welding gun. By dynamically adjusting the motion trajectory of the welding gun through an algorithm, it can adapt to complex welding environments and requirements, thereby improving the flexibility and applicability of welding.
[0090] 4. The present invention analyzes key parameters through an analysis algorithm, so that by collecting and analyzing all key parameters in the welding process, the welding state can be monitored more accurately and potential problems can be discovered in time. By dividing the welding process into multiple operation modes or state groups, it is helpful to adjust the welding gun posture and motion trajectory more carefully and specifically, thereby improving the controllability of welding. By detecting outlier factors and identifying abnormal data points, deviations from the normal welding state can be discovered and processed in real time to avoid welding quality problems. By continuously monitoring and optimizing welding parameters, the adjustment and repair time in the welding process can be reduced, thereby improving the overall welding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0092] Figure 1 is a flow chart of a method for improving the motion stability of a welding gun based on welding gun posture according to an embodiment of the present invention;
[0093] Figure 2 The invention is a principle block diagram of a welding gun motion stability improvement system based on welding gun posture according to an embodiment of the present invention.
[0094] In the figure:
[0095] 1. Image acquisition and processing module; 2. Image analysis and feature recognition module; 3. Stereo vision technology module; 4. Posture acquisition and trajectory optimization module; 5. Data analysis and evaluation module; 6. Result judgment and adjustment control module. DETAILED DESCRIPTION
[0096] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0097] In the description of the present invention, unless otherwise specified, the meaning of "plurality" is two or more. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0098] According to an embodiment of the present invention, a method and system for improving the motion stability of a welding gun based on welding gun posture are provided.
[0099] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the method for improving the motion stability of a welding gun based on the welding gun posture according to an embodiment of the present invention, the method for improving the motion stability of a welding gun based on the welding gun posture comprises the following steps:
[0100] S1, obtaining a welding groove (i.e., a portion of a welding joint) image, and preprocessing the welding groove image to obtain a welding groove feature image;
[0101] Specifically, the welding groove image is acquired by a high-resolution camera.
[0102] Specifically, the weld groove feature image refers to an image extracted from the original weld groove image through image processing technology, which highlights the key features of the weld groove. This feature image focuses on revealing and emphasizing specific attributes that are closely related to welding quality, such as the shape, size, angle of the groove and the butt joint of the weld.
[0103] S2. Use classification algorithm to analyze the welding groove feature image and identify the key features of the welding groove;
[0104] Specifically, the key features include groove shape and size (including groove width, depth and angle. The groove shape is crucial to the strength and quality of the welded joint. Different welding methods and materials require different groove shapes and sizes), weld preparation (preparation of the groove before welding, such as whether there are any defects, oil stains, rust or other factors that may affect the welding quality), weld butt joint (the alignment of the materials on both sides of the groove is extremely important. Poor butt joint will lead to uneven welds and potential welding defects), weld edge quality (including whether the weld edge is flat and without notches, which is also an important indicator for evaluating welding quality), weld uniformity and continuity and potential welding defects (such as pores, cracks, incomplete penetration, etc. These defects are usually the focus of quality control during the welding process), etc.
[0105] S3. Based on key features, the three-dimensional coordinates of the weld are obtained using stereo vision technology, and the depth of the welding groove is calculated;
[0106] Specifically, stereo vision technology, also known as stereo vision measurement or stereophotogrammetry, is a technology that uses two or more cameras to shoot the same scene from different angles and obtain the three-dimensional spatial coordinates of objects by analyzing these images. This technology imitates the human binocular vision mechanism and understands the position and shape of objects in three-dimensional space by comparing and analyzing images of the same object from different perspectives.
[0107] Specifically, the calculation of the depth of the welding groove includes:
[0108] Distance from point to plane: If a reference plane is used, the vertical distance of each point in the weld groove relative to that plane can be calculated. The depth of the groove can be defined as the maximum or average of these vertical distances.
[0109] Distance from point to line: If a reference line is used (for example, one side of a weld groove), the perpendicular distance of each point relative to the reference line is calculated. Similarly, the depth of the groove can be the maximum or average of these distances.
[0110] S4, based on the three-dimensional coordinates of the weld and the depth of the welding groove, obtain the real-time posture of the welding gun, and adjust the movement trajectory of the welding gun through the optimization algorithm;
[0111] Specifically, the real-time posture of the welding gun refers to the position and direction of the welding gun relative to the welding groove during the welding process.
[0112] Specifically, the welding gun motion trajectory refers to the path that the welding gun moves along the weld during the welding process.
[0113] S5. Real-time monitoring of key parameters in the welding process, analysis of key parameters through analysis algorithms, and evaluation of weld formation quality;
[0114] Specifically, the key parameters include current and voltage (current and voltage in the welding process are key parameters, which directly affect the heat input and welding strength of the weld), welding speed (the movement speed of the welding gun or welding material affects the formation and cooling rate of the weld), wire feed speed (in automatic or semi-automatic welding, the wire feed speed has an important influence on the welding process and weld quality), welding gun posture (the position and angle of the welding gun are crucial to the welding quality), gas flow (in gas shielded welding, the flow of shielding gas has a significant effect on weld protection and pore formation), welding temperature (the temperature of the welding area can affect the cooling rate and microstructure of the weld) and weld shape and size (including weld width, height, concavity, etc.), etc.
[0115] S6. Based on the evaluation results, determine whether the key parameters exceed the preset range, and adjust the key parameters or issue a warning.
[0116] Preferably, acquiring the welding groove image and preprocessing the welding groove image to obtain the welding groove feature image comprises the following steps:
[0117] S11, removing noise in the welding groove image by using a Gaussian filter;
[0118] Specifically, the Gaussian filter is a commonly used image filter that can remove noise by smoothing the image. It performs weighted averaging on each pixel in the image based on the weight of the Gaussian function, thereby reducing the noise in the image.
[0119] S12, correcting the brightness and color deviation of the welding groove image after noise removal;
[0120] Specifically, the brightness and color deviation correction is to make the brightness and color of the image more accurate and consistent. By performing grayscale correction, white balance correction and other processing on the image, the brightness and color of the image can be adjusted to make it more consistent with the real scene.
[0121] S13, enhancing the contrast and clarity of the corrected welding groove image by image processing technology;
[0122] Specifically, the image processing technology is a histogram equalization method, the basic idea of which is to adjust the grayscale distribution of the image so that the pixel values of each grayscale level in the image are distributed more evenly, thereby enhancing the details and contrast of the image.
[0123] S14, extracting an image sequence from the welding groove image after enhancing contrast and clarity, and graying each frame of the image in the image sequence to obtain a grayscale image;
[0124] S15, using the Sobel operator to calculate the edge gradient of each pixel in the grayscale image;
[0125] Specifically, the Sobel operator is a classic image edge detection operator used to detect edges and contours in images. It is based on discrete differential operations and calculates the horizontal and vertical gradient values of each pixel in the image, thereby highlighting the areas in the image where the grayscale changes greatly, namely the edges or contours.
[0126] S16, using a local gradient mean method to locally screen and enhance edge gradients, and filtering edge gradients through a threshold to obtain a gradient image;
[0127] Specifically, the local gradient mean method is a method used in image processing, which is mainly used to enhance the edge or detail information of the image while reducing the influence of noise. It screens and enhances edge features by calculating the gradient mean of pixel points in the local area of the image.
[0128] S17, representing the welding groove image by calculating the ordered feature vector of the area through the Euclidean distance;
[0129] Specifically, Euclidean distance is a commonly used distance measurement method for calculating the distance between two vectors. In image processing and pattern recognition, Euclidean distance is often used to compare the similarity or difference between two vectors or features.
[0130] S18, performing thinning and binarization processing on the gradient image, marking the pixel points whose gradient values are greater than the threshold as edge points;
[0131] Specifically, thinning is an image processing technique that aims to make edge lines thinner and longer, and is usually used to extract detailed features in images. Thinning operations can reduce the width of edge lines through a series of algorithms, such as the Zhang-Suen algorithm and the Guo-Hall algorithm, to make them more consistent with the actual edge structure.
[0132] Specifically, binarization is the process of converting the grayscale value of an image into two values, usually by dividing the image into two areas, one with a pixel value of 0 (usually representing black) and the other with a pixel value of 255 (usually representing white). This process helps to highlight the target or specific area in the image.
[0133] S19, connecting adjacent edge points into a connected domain, and obtaining a final edge image as a welding groove feature image.
[0134] Preferably, the classification algorithm is used to analyze the welding groove feature image and identify the key features of the welding groove, which includes the following steps:
[0135] S21, setting relevant parameters, and generating a preliminary welding groove feature image and a corresponding feature trend matrix based on the relevant parameters;
[0136] S22, calculating the fitness function value of the preliminary welding groove feature image (particle);
[0137] S23, calculating the fitness variance of the group (particle group) of all welding groove feature images, if the preset conditions are met, mutation occurs and the process goes to step S25; otherwise, the process goes to step S24 for optimization;
[0138] S24, updating the inertia weight point according to the inertia weight calculation formula, and updating the change trend (particle speed) and position of the welding groove feature image according to the change trend update formula and the position update formula respectively;
[0139] S25, check whether the termination condition is met, if it is met, then end the optimization process; otherwise, return to step S22 to continue the optimization;
[0140] S26, assigning the found optimal parameter vector to the classification model (support vector machine model);
[0141] S27, inputting the processed welding groove feature image into the classification model, and training the classification model to obtain a trained classification model;
[0142] S28, using the trained classification model to classify the new welding groove feature image, obtaining the final welding groove classification result, and stopping the calculation;
[0143] S29. Identify the key features of the welding groove through the final welding groove classification results.
[0144] Specifically, the classification algorithm is an adaptive particle swarm optimization support vector machine algorithm, which is an algorithm that combines the particle swarm optimization algorithm and the support vector machine, and is used to optimize the parameters of the support vector machine model. The adaptive particle swarm optimization support vector machine algorithm continuously updates the position and speed of particles and uses the search capability of the particle swarm algorithm to find the optimal combination of support vector machine parameters, thereby improving the performance and generalization ability of the model.
[0145] Preferably, using the trained classification model to classify the new welding groove feature image to obtain the final welding groove classification result, and stopping the calculation includes the following steps:
[0146] S281, using the trained classification model to analyze the new welding groove feature image, and predicting the welding groove category probability corresponding to each welding groove feature image;
[0147] S282, setting a confidence threshold, screening the probability of each category to which each welding groove feature image belongs, eliminating the prediction results below the confidence threshold, and determining the category label of each welding groove feature image from the probability output by the classification model according to the classification threshold;
[0148] S283. The screened and determined category labels are used as the final welding groove classification results, and the calculation process ends.
[0149] Preferably, the inertia weight calculation formula is:
[0150] ;
[0151] in, G Expressed as inertia weight;
[0152] G max , G min Respectively represent the starting value and ending value of the inertia weight;
[0153] D Represents the current iteration number;
[0154] D max Expressed as the maximum number of iterations.
[0155] Preferably, obtaining the real-time posture of the welding gun based on the three-dimensional coordinates of the weld and the depth of the welding groove, and adjusting the motion trajectory of the welding gun through an optimization algorithm comprises the following steps:
[0156] S41, determining the number of different welding gun motion trajectories during the welding process (i.e., the number of cuckoo nests), and setting the maximum number of iterations and parameter adjustment probability (i.e., mutation probability) of the welding process;
[0157] S42, using a heuristic algorithm (i.e., Tent mapping) to generate a preliminary welding gun motion trajectory of the welding gun;
[0158] Specifically, the index configuration scheme for generating database tables using Tent mapping includes:
[0159] Understanding the Tent Mapping Principle: The Tent Mapping is a simple one-dimensional mapping used to generate sequences with chaotic properties. It generates a series of values in an iterative manner that exhibit irregular and unpredictable behavior under certain conditions.
[0160] Determine the goal of index configuration: Clearly define the goal of using tent mapping to generate preliminary welding gun motion trajectories. For example, it may be to optimize query efficiency, balance read and write performance, or reduce the cost of index maintenance.
[0161] Generate index configuration plan: Use the data or pattern generated by Tent mapping to guide the creation of indexes. For example, determine the type and parameters of the index based on the distribution characteristics of the data. In this step, you need to consider the actual usage scenarios and performance requirements of the database.
[0162] S43, calculating the fitness value of each welding gun motion trajectory (i.e., the bird's nest), and recording the best and second-best welding gun motion trajectory states;
[0163] S44, using a random update strategy (i.e., Levy flight) to adjust the motion trajectory of the welding gun, and repeating step S43;
[0164] Specifically, Lévy flight is a mathematical random walk. In the cuckoo search algorithm, Lévy flight is used to update the location of the bird's nest (i.e., the trajectory of the welding gun).
[0165] S45, retaining the current welding gun motion trajectory or adopting a new welding gun motion trajectory according to a specific criterion formula, and repeating step S43;
[0166] Specifically, the specific criterion formula is the nest position update formula. Since the cuckoo algorithm uses random migration and greedy strategies in each iteration, only the global optimal individual is always kept as the leader in the population, which easily leads to a decrease in the algorithm's regional exploration ability for other excellent solutions. In order to enhance the vitality and efficiency of the search, the present invention draws on the idea of particle swarm algorithm and adds social learning and self-learning parts.
[0167] S46, mutating the welding path by using the grey wolf algorithm, and repeating step S43;
[0168] Specifically, the present invention draws on the hunting mechanism of α, β, and δ wolves in the gray wolf algorithm, that is, the leader wolf calls on the group to get close to its surroundings as quickly as possible to achieve the purpose of rapid population convergence. The optimal solution in the gray wolf group is α, the second optimal solution is β, the third optimal solution is δ, and other solutions are called ω. In each search process, α, β, and δ wolves are used as leader wolves to surround the prey, wherein the prey is marked as the location of the head wolf. In the present invention, the global historical optimal solution, the global historical suboptimal solution, and the individual historical optimal solution after each cuckoo algorithm optimization are used as α, β, and δ wolves, respectively, and other solutions in the population are mutated according to the gray wolf algorithm.
[0169] S47, loop iterate, and execute steps S44 to S46 until a predetermined iteration termination condition is met;
[0170] S48. After the iteration is completed, the global optimal solution is output as the welding gun motion trajectory.
[0171] Specifically, the optimization algorithm is a hybrid cuckoo optimization algorithm, which is an optimization algorithm developed on the basis of the original cuckoo search algorithm. The cuckoo search algorithm is a global optimization algorithm based on the cuckoo parasitic strategy, and in the hybrid cuckoo optimization algorithm, other types of optimization algorithms are integrated, such as genetic algorithm, ant colony optimization algorithm, particle swarm optimization algorithm, gray wolf algorithm, etc., to enhance the search ability and speed of the cuckoo search algorithm.
[0172] Preferably, the specific criterion formula is:
[0173] ;
[0174] in, Expressed as n After +1 iteration, i A new state of the welding gun motion trajectory;
[0175] Expressed as n At the beginning of the iteration, i The current status of the welding gun motion trajectory;
[0176] In each iteration, i The update step size of the welding gun motion trajectory (i.e. the trajectory of Levy flight);
[0177] Expressed as i The best historical state of the welding gun movement trajectory (which can enhance the self-learning ability of position update);
[0178] and They are respectively represented as the global best historical state and the global second best historical state in all welding gun motion trajectories (which can enhance the social learning ability of position updating);
[0179] o 1. o 2. o 3 represent the learning factors of the best historical state of the welding gun motion trajectory, the best global historical state, and the second best global historical state.
[0180] Specifically, o 1. o 2. o 3 are all random numbers in the interval [0, 1].
[0181] Specifically, o 1 is the learning factor for the best historical solution of an individual, which indicates the self-learning ability of the particle. o 2 and o3 are the learning factors for the global best historical solution and the global second best historical solution, respectively, indicating the social learning ability of particles.
[0182] Preferably, real-time monitoring of key parameters in the welding process, analyzing the key parameters by an analysis algorithm, and evaluating the quality of weld formation include the following steps:
[0183] S51, obtaining the number of all key parameters in the welding process as the number of cluster centers, clustering all parameter data collected in the welding process, and dividing the welding process into multiple operation modes or state groups;
[0184] Specifically, the analysis algorithm is the DBSCAN clustering algorithm. DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based spatial clustering algorithm that defines a cluster of data points as a density-connected area.
[0185] S52, extracting key data points from each welding process state group;
[0186] S53, using a detection algorithm to calculate outlier factors of key data points to identify data points that deviate from a normal welding state;
[0187] Specifically, using the detection algorithm to calculate the outlier factor of the key data point to identify the data points that deviate from the normal welding state includes the following steps:
[0188] S531, extracting all key data points in the welding process status group;
[0189] S532, calculating the distance neighborhood of each key data point, where the distance neighborhood is other key data points closest to the key data point;
[0190] Specifically, it is a common operation to calculate the distance neighborhood of each key data point. The so-called distance neighborhood refers to the other key data points closest to a key data point under a certain distance measurement. Commonly used distance measurement methods include: Euclidean distance, Manhattan distance, Chebyshev distance and Mahalanobis distance.
[0191] S533, calculating the reachable distance and the reachable ratio of each key data point relative to the distance neighborhood, where the reachable ratio is the reachable distance from the distance neighborhood divided by the average distance from other key data points;
[0192] S534, calculating the local outlier factor of each key data point, where the local outlier factor is the reachable distance ratio minus a preset threshold;
[0193] S535: If the local outlier factor of the key data point is greater than 0, the key data point is determined to be an outlier.
[0194] Specifically, the detection algorithm is the local outlier detection algorithm. The local outlier detection algorithm (Local Outlier Factor, referred to as LOF) is an algorithm for anomaly detection. Unlike many other outlier detection algorithms, LOF takes into account the local characteristics of neighboring points, so it can more accurately identify outliers in various density areas. In the LOF algorithm, an object's LOF score is greater than 1, indicating that the object is more likely to be an outlier than its neighbors.
[0195] S54, recording the number of outliers in each state group, and calculating the proportion of outliers in each welding state group;
[0196] Specifically, the proportion of outliers is calculated by dividing the number of outliers by the total number of points in the cluster.
[0197] S55, setting a preset threshold value of the outlier ratio. If the outlier ratio in the welding state group exceeds the preset threshold value, it is determined that the welding state group has abnormal welding behavior, and all relevant welding points or time periods of the welding state group are marked as abnormal areas.
[0198] Specifically, in the quality control and monitoring of the welding process, outlier detection is an important technology that can help identify potential abnormal welding behaviors, such as improper settings of welding parameters, equipment failures, or operating errors. Such abnormal behaviors can be effectively detected by analyzing the data in the welding state group. First, a preset threshold is set for the outlier ratio, such as 20%. This threshold represents the maximum acceptable abnormal data ratio in normal welding activities. If the proportion of outliers in a state group exceeds this threshold, then the state group is marked as having abnormal welding behavior, and all related welding points or time periods of the welding state group are marked as abnormal areas.
[0199] S56, comparing key parameters of the welding points or time periods marked as abnormal areas with parameters of a preset welding state to determine the quality of weld formation.
[0200] Specifically, the quality of weld formation refers to the performance and appearance quality of the weld after welding is completed, mainly including appearance quality (the weld should be free of defects such as cracks, pores, slag inclusions, and the surface should be uniform and smooth), dimensional accuracy (the width and height of the weld should meet the preset standards), microstructure (the metal grains inside the weld should be uniform and free of undesirable structures), mechanical properties (the weld should have sufficient tensile strength, elongation and toughness) and non-destructive testing (confirming that there are no hidden defects in the weld through detection methods such as X-rays or ultrasound).
[0201] Preferably, obtaining the number of all key parameters in the welding process as the number of cluster centers, clustering all parameter data collected in the welding process, and dividing the welding process into multiple operation modes or state groups comprises the following steps:
[0202] S511. Standardize all key parameters in the welding process to ensure that the value ranges between different features are consistent;
[0203] S512, meshing the feature space of all key parameters in the welding process with preset meshing parameters to establish a mapping relationship between data points and corresponding meshes;
[0204] S513, constructing a grid density matrix based on grid division, and using it to represent the density of data points in different grids;
[0205] S514, repeatedly performing mesh division by adjusting mesh division parameters to find the best density level division;
[0206] S515, hierarchically classifying the importance characteristics of all key parameters in the welding process according to the constructed grid density matrix, and determining the importance of different levels;
[0207] S516, starting from the highest density level, removing the grid unit with the highest density, and calculating the clustering algorithm parameters of the current density level according to the equivalent rule, and performing a clustering operation;
[0208] S517, randomly selecting data points in the grid cells with the highest density, expanding the class, and clustering based on the high density threshold and the low density threshold;
[0209] S518, repeating steps S514 and S515 to perform clustering until clustering of the lowest density threshold is completed;
[0210] S519. According to the clustering result, the welding process is divided into a plurality of operation modes or state groups.
[0211] Specifically, the operation modes include:
[0212] Standard operating mode: This is the most ideal mode, where all welding parameters such as current, voltage, speed, etc. comply with preset best welding practices and standards.
[0213] Low Power Mode: In this mode, welding current and voltage may be lower than ideal, perhaps due to thin material thickness or the welder selecting a lower heat input.
[0214] High Speed Mode: This mode welds faster than standard operation and may be used to speed up production, but may affect weld quality.
[0215] Thick Material Mode: For welding thicker materials, the current and voltage in this mode may be higher to ensure sufficient heat input and penetration.
[0216] Specifically, the status groups include:
[0217] Steady state group: In this group, the welding operation remains stable, the parameters change little, and the weld quality generally meets the standards.
[0218] Change state group: This group is characterized by significant changes in welding parameters (such as current, speed), which may be caused by unstable operation or environmental factors.
[0219] Abnormal Status Group: In this group, welding parameters may exhibit abnormal behavior, such as extremely high or low current values, which may indicate equipment failure, operating error, or other problems.
[0220] According to another embodiment of the present invention, Figure 2 As shown, a welding gun motion stability improvement system based on welding gun posture is also provided, and the welding gun motion stability improvement system based on welding gun posture includes:
[0221] The image acquisition and processing module 1 is used to acquire the welding groove image and pre-process the welding groove image to obtain the welding groove feature image;
[0222] Image analysis and feature recognition module 2, used to analyze the welding groove feature image by using a classification algorithm and identify the key features of the welding groove;
[0223] Stereo vision technology module 3, used to obtain the three-dimensional coordinates of the weld based on key features using stereo vision technology and calculate the depth of the welding groove;
[0224] The posture acquisition and trajectory optimization module 4 is used to acquire the real-time posture of the welding gun based on the three-dimensional coordinates of the weld and the depth of the welding groove, and adjust the movement trajectory of the welding gun through an optimization algorithm;
[0225] Data analysis and evaluation module 5, used to monitor key parameters in the welding process in real time, analyze the key parameters through analysis algorithms, and evaluate the quality of weld formation;
[0226] Result judgment and adjustment control module 6, used to judge whether the key parameters exceed the preset range according to the evaluation results, and adjust the key parameters or issue a warning;
[0227] Among them, the image acquisition and processing module 1 is connected to the stereoscopic vision technology module 3 through the image analysis and feature recognition module 2, the stereoscopic vision technology module 3 is connected to the data analysis and evaluation module 5 through the posture acquisition and trajectory optimization module 4, and the data analysis and evaluation module 5 is connected to the result judgment and adjustment control module 6.
[0228] In summary, with the help of the above-mentioned technical scheme of the present invention, the present invention analyzes the characteristic image of the welding groove through a classification algorithm, so that by setting relevant parameters, a characteristic image and a characteristic trend matrix of the welding groove are generated, which helps to adjust the welding gun posture more accurately, ensure the accuracy and stability of the welding process, and by calculating the fitness function value and the group fitness variance, it can dynamically adapt to different welding conditions and environments, improve the flexibility and efficiency of the welding process, and assign the optimal parameter vector to the classification model, and obtain an efficient classification model through the training process, so that the welding gun can be automatically adjusted according to real-time data in actual operation, improve the welding quality and efficiency, and at the same time, by setting the confidence threshold and the classification threshold, it helps to eliminate uncertain prediction results and reduce errors, so that different types of welding grooves can be more accurately identified, and the overall quality of the welding process can be improved. Then, by accurately identifying and classifying the characteristics of the welding groove, the movement of the welding gun can be more effectively controlled, ensuring the stability and continuity of the welding process, and reducing welding defects caused by improper posture. The present invention adjusts the motion trajectory of the welding gun through an optimization algorithm, so that by optimizing the motion trajectory of the welding gun, the relative position and angle between the welding gun and the weld can be more accurately controlled, thereby improving the accuracy of the welding seam, using optimization techniques such as heuristic algorithms and gray wolf algorithms, so that the motion trajectory of the welding gun can dynamically adapt to different welding conditions, improve adaptability and optimization effects, and reduce welding defects caused by improper welding gun posture by accurately controlling the motion trajectory of the welding gun. The motion trajectory of the welding gun is dynamically adjusted by an algorithm to adapt to complex welding environments and requirements, thereby improving the flexibility and applicability of welding. The present invention analyzes key parameters through an analysis algorithm, so that by collecting and analyzing all key parameters in the welding process, the welding state can be more accurately monitored and potential problems can be discovered in time. By dividing the welding process into multiple operation modes or state groups, it is helpful to adjust the posture and motion trajectory of the welding gun more carefully and specifically, and improve the controllability of welding. By detecting outlier factors and identifying abnormal data points, the situation of deviation from the normal welding state can be discovered and processed in real time to avoid welding quality problems. By continuously monitoring and optimizing welding parameters, the adjustment and repair time in the welding process can be reduced, and the overall welding efficiency can be improved.
[0229] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for improving the motion stability of a welding gun based on welding gun posture, characterized in that: The method for improving the motion stability of a welding gun based on welding gun posture comprises the following steps: S1, obtaining a welding groove image, and preprocessing the welding groove image to obtain a welding groove feature image; S2. Use classification algorithm to analyze the welding groove feature image and identify the key features of the welding groove; S3. Based on key features, the three-dimensional coordinates of the weld are obtained using stereo vision technology, and the depth of the welding groove is calculated; S4, based on the three-dimensional coordinates of the weld and the depth of the welding groove, obtain the real-time posture of the welding gun, and adjust the movement trajectory of the welding gun through the optimization algorithm; S5. Real-time monitoring of key parameters in the welding process, analysis of key parameters through analysis algorithms, and evaluation of weld formation quality; S6. Based on the evaluation results, determine whether the key parameters exceed the preset range, and adjust the key parameters or issue a warning; The method of obtaining the real-time posture of the welding gun based on the three-dimensional coordinates of the weld and the depth of the welding groove, and adjusting the motion trajectory of the welding gun through an optimization algorithm comprises the following steps: S41, determining the number of different welding gun motion trajectories during the welding process, and setting the maximum number of iterations and parameter adjustment probability of the welding process; S42, generating a preliminary welding gun motion trajectory of the welding gun using a heuristic algorithm; S43, calculating the fitness value of each welding gun motion trajectory, and recording the best and second best welding gun motion trajectory states; S44, using a random update strategy to adjust the welding gun motion trajectory, and repeating step S43; S45, retaining the current welding gun motion trajectory or adopting a new welding gun motion trajectory according to a specific criterion formula, and repeating step S43; S46, mutating the welding path by using the grey wolf algorithm, and repeating step S43; S47, loop iterate, and execute steps S44 to S46 until a predetermined iteration termination condition is met; S48, after the iteration is completed, the global optimal solution is output as the welding gun motion trajectory; The specific criterion formula is: ; in, Expressed as n After +1 iteration, i A new state of the welding gun motion trajectory; Expressed as n At the beginning of the iteration, i The current status of the welding gun motion trajectory; In each iteration, i The update step size of the welding gun motion trajectory; Expressed as i The best historical state of the welding gun movement trajectory; and They are respectively represented as the global best historical state and the global second best historical state in all welding gun motion trajectories; o 1. o 2. o 3 represent the learning factors of the best historical state, the best global historical state, and the second best global historical state of the welding gun motion trajectory; The real-time monitoring of key parameters in the welding process, analyzing the key parameters through an analysis algorithm, and evaluating the quality of the weld formation includes the following steps: S51, obtaining the number of all key parameters in the welding process as the number of cluster centers, clustering all parameter data collected in the welding process, and dividing the welding process into multiple operation modes or state groups; S52, extracting key data points from each welding process state group; S53, using a detection algorithm to calculate outlier factors of key data points to identify data points that deviate from a normal welding state; S54, recording the number of outliers in each state group, and calculating the proportion of outliers in each welding state group; S55, setting a preset threshold value of the outlier ratio. If the outlier ratio in the welding state group exceeds the preset threshold value, it is determined that the welding state group has abnormal welding behavior, and all relevant welding points or time periods of the welding state group are marked as abnormal areas. S56, comparing parameter data of the welding point or time period marked as an abnormal area with parameters of a preset welding state to determine the quality of weld formation.
2. A method for improving the motion stability of a welding gun based on welding gun posture according to claim 1, characterized in that: The steps of obtaining the welding groove image and preprocessing the welding groove image to obtain the welding groove feature image are as follows: S11, removing noise in the welding groove image by using a Gaussian filter; S12, correcting the brightness and color deviation of the welding groove image after noise removal; S13, enhancing the contrast and clarity of the corrected welding groove image by image processing technology; S14, extracting an image sequence from the welding groove image after enhancing contrast and clarity, and graying each frame of the image in the image sequence to obtain a grayscale image; S15, using the Sobel operator to calculate the edge gradient of each pixel in the grayscale image; S16, using a local gradient mean method to locally screen and enhance edge gradients, and filtering edge gradients through a threshold to obtain a gradient image; S17, representing the welding groove image by calculating the ordered feature vector of the area through the Euclidean distance; S18, performing thinning and binarization processing on the gradient image, marking the pixel points whose gradient values are greater than the threshold as edge points; S19, connecting adjacent edge points into a connected domain, and obtaining a final edge image as a welding groove feature image.
3. The method for improving the motion stability of a welding gun based on welding gun posture according to claim 1, characterized in that: The method of using a classification algorithm to analyze the welding groove feature image and identify the key features of the welding groove includes the following steps: S21, setting relevant parameters, and generating a preliminary welding groove feature image and a corresponding feature trend matrix based on the relevant parameters; S22, calculating the fitness function value of the preliminary welding groove feature image; S23, calculating the group fitness variance of all welding groove feature images, if the preset conditions are met, mutation occurs and the process goes to step S25; otherwise, the process goes to step S24 for optimization; S24, updating the inertia weight point according to the inertia weight calculation formula, and updating the change trend and position of the welding groove feature image according to the change trend update formula and the position update formula respectively; S25, check whether the termination condition is met, if it is met, then end the optimization process; otherwise, return to step S22 to continue to optimize; S26, assigning the found optimal parameter vector to the classification model; S27, inputting the processed welding groove feature image into the classification model, and training the classification model to obtain a trained classification model; S28, using the trained classification model to classify the new welding groove feature image, obtaining the final welding groove classification result, and stopping the calculation; S29. Identify the key features of the welding groove through the final welding groove classification results.
4. A method for improving the motion stability of a welding gun based on welding gun posture according to claim 3, characterized in that: The method of using the trained classification model to classify the new welding groove feature image to obtain the final welding groove classification result and stopping the calculation includes the following steps: S281, using the trained classification model to analyze the new welding groove feature image, and predicting the welding groove category probability corresponding to each welding groove feature image; S282, setting a confidence threshold, screening the probability of each category to which each welding groove feature image belongs, eliminating the prediction results below the confidence threshold, and determining the category label of each welding groove feature image from the probability output by the classification model according to the classification threshold; S283. The screened and determined category labels are used as the final welding groove classification results, and the calculation process ends.
5. The method for improving the motion stability of a welding gun based on welding gun posture according to claim 3, characterized in that: The inertia weight calculation formula is: ; in, G Expressed as inertia weight; G max , G min Respectively represent the starting value and ending value of the inertia weight; D Represents the current iteration number; D max Expressed as the maximum number of iterations.
6. The method for improving the motion stability of a welding gun based on welding gun posture according to claim 1, characterized in that: The method of obtaining the number of all key parameters in the welding process as the number of cluster centers, clustering all parameter data collected in the welding process, and dividing the welding process into multiple operation modes or state groups includes the following steps: S511. Standardize all key parameters in the welding process to ensure that the value ranges between different features are consistent; S512, meshing the feature space of all key parameters in the welding process with preset meshing parameters to establish a mapping relationship between data points and corresponding meshes; S513, constructing a grid density matrix based on grid division, and using it to represent the density of data points in different grids; S514, repeatedly performing mesh division by adjusting mesh division parameters to find the best density level division; S515, hierarchically classifying the importance characteristics of all key parameters in the welding process according to the constructed grid density matrix, and determining the importance of different levels; S516, starting from the highest density level, removing the grid unit with the highest density, and calculating the clustering algorithm parameters of the current density level according to the equivalent rule, and performing a clustering operation; S517, randomly selecting data points in the grid cells with the highest density, expanding the class, and clustering based on the high density threshold and the low density threshold; S518, repeating steps S514 and S515 to perform clustering until clustering of the lowest density threshold is completed; S519. According to the clustering result, the welding process is divided into a plurality of operation modes or state groups.
7. A welding gun motion stability improvement system based on welding gun posture, used to implement the welding gun motion stability improvement method based on welding gun posture as described in any one of claims 1 to 6, characterized in that: The welding gun motion stability improvement system based on welding gun posture includes: An image acquisition and processing module is used to acquire a welding groove image and pre-process the welding groove image to obtain a welding groove feature image; Image analysis and feature recognition module, used to analyze the welding groove feature image using classification algorithm and identify the key features of the welding groove; Stereo vision technology module, which is used to obtain the three-dimensional coordinates of the weld based on key features and calculate the depth of the welding groove using stereo vision technology; The posture acquisition and trajectory optimization module is used to obtain the real-time posture of the welding gun based on the three-dimensional coordinates of the weld and the depth of the welding groove, and adjust the movement trajectory of the welding gun through the optimization algorithm; Data analysis and evaluation module, which is used to monitor the key parameters in the welding process in real time, analyze the key parameters through analytical algorithms, and evaluate the quality of weld formation; The result judgment and adjustment control module is used to judge whether the key parameters exceed the preset range according to the evaluation results, and adjust the key parameters or issue a warning; Among them, the image acquisition and processing module is connected with the stereoscopic vision technology module through the image analysis and feature recognition module, the stereoscopic vision technology module is connected with the data analysis and evaluation module through the posture acquisition and trajectory optimization module, and the data analysis and evaluation module is connected with the result judgment and adjustment control module.
