Automatic welding device for spherical compensator and control method of automatic welding device
By designing the automatic welding device of the spherical compensator and adjusting the welding parameters in real time using sensors and robotics technology, the problem of uneven strength distribution at the spherical compensator connection is solved, and the welding quality is improved and the service life is extended.
Patent Information
- Application Number
- CN202510167304.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-15
- Publication Date
- 2025-04-11
AI Technical Summary
The uneven strength distribution of the spherical compensator at the connection between the ball head and the straight pipe leads to inconsistent weld volumes, which increases the shape complexity of the connection and may lead to failure phenomena such as leakage or fracture.
Design a spherical compensator automatic welding device, using components such as chucks, rotating plates, reducer motors, electro-hydraulic push rods and welding robots, combined with displacement sensors and vision sensors, to detect the position of the welding joints in real time and adjust the position and angle of the end face of the welding wire to ensure that the real-time position of the welding joint coincides with the position of the end face of the welding wire.
By evenly distributing the welding wire, the strength uniformity of the ball head and the straight pipe connection is improved, the welding quality is ensured, the shape defects during the welding process are reduced, and the service life of the compensator is extended.
Smart Images

Figure CN119794678A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of welding equipment, in particular to an automatic welding device for a spherical compensator and a control method thereof. Background Art
[0002] The spherical compensator includes a sphere, which is fixedly connected by a ball head and a straight tube by welding. In the actual manufacturing process, since both the ball head and the straight tube are hollow structures, there are often certain deformation errors in the manufacturing process. This deformation error is not only manifested as an overall dimensional deviation, but may also include local shape distortion or irregularity, and depressions or protrusions at the connection between the ball head and the straight tube. These depressions or protrusions not only further increase the complexity of the shape of the connection, but may also cause inconsistent welds when connecting the ball head and the straight tube, resulting in welds that are too dense or thick, too sparse or weak in some areas. The inconsistency of the weld volume directly leads to the uneven strength distribution at the connection between the ball head and the straight tube. In areas with weaker strength, the compensator is more likely to fail, such as leakage and breakage, when it is subjected to the axial thrust caused by the medium pressure in the pipeline, temperature changes, and other external forces.
[0003] Therefore, how to overcome the problem of uneven strength distribution at the connection between the ball head and the straight pipe and improve the overall performance and service life of the compensator has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0004] In order to solve the technical problems in the background technology, the present invention discloses an automatic welding device for a spherical compensator and a control method thereof.
[0005] The present invention provides an automatic welding device for a spherical compensator, which is used for welding a sphere. The sphere is composed of a ball head and a straight tube. The connection is circumferentially welded. The ball head and the straight tube are fixed by spot welding. The base is provided with:
[0006] A chuck is used to grab and fix the straight pipe; the chuck is installed on the rotating plate and is rotatably connected to the rotating plate;
[0007] A driving motor drives the chuck to rotate;
[0008] A bracket for supporting the ball head;
[0009] The screw rod is arranged vertically, and its upper and lower ends are movably connected to the base through bearings;
[0010] The rotating block is threadedly connected to the screw rod and movably connected to the rotating plate, so that the rotating plate can rotate up and down;
[0011] A reduction motor, a driving end of which is connected to one end of the screw rod, driving the screw rod to rotate;
[0012] An electro-hydraulic push rod, whose cylinder body is hinged to the bottom plate, and whose driving end is hinged to the opening and closing end of the rotating plate, is used to drive the rotating plate to rotate;
[0013] The welding robot, with its welding gun pointing vertically downward, welds the joint between the ball head and the straight pipe;
[0014] When the reduction motor drives the rotating plate to rise and fall, the electro-hydraulic push rod starts at the same time;
[0015] Point a is set at the connection between the ball head and the straight pipe. The tangent line L to the ball head is drawn from point a. The angle between L and the straight pipe is β. When welding, the angle between the straight pipe and the vertical is β / 2.
[0016] The chuck is equipped with a displacement sensor and a visual sensor;
[0017] The displacement sensor is used to detect the height displacement of the welding point between the ball head and the straight pipe;
[0018] The visual sensor is used to acquire data on the weld groove, the front end of the molten pool and the weld forming area at the welding point, synchronously capture the weld image, and obtain the weld plane position information.
[0019] The beneficial effects of the above arrangement are: 1. During welding, the angle between the straight tube and the vertical is set so that when the welding wire and the ball head are in direct contact, an isosceles triangle is formed, with the end face of the welding wire as the base and the waist being the portion of the tangent L between point a and the welding wire and the portion of the outer wall of the straight tube between point a and the welding wire; during such welding, the connection between the welding wire and the ball head and the straight tube is evenly distributed, thereby making the strength distribution at the connection between the ball head and the straight tube more even; 2. The real-time position of the welding point is detected by a displacement sensor and a visual sensor, and the position of the end face of the welding wire and the angle between the welding wire and the straight tube are adjusted according to this position, so that the real-time position of the welding point coincides with the position of the end face of the welding wire. In this way, when a shape defect occurs at the welding point, the position of the end of the welding wire is immediately adjusted so that the connection strength of the weld at the defective position is consistent with that of the ball head and the straight tube.
[0020] When the length of the straight tube is too short, if the claws of the chuck still grab the outer wall of the straight tube, there will be insufficient welding space. Based on this, a further improvement is that the claws of the chuck extend into the inner wall of the straight tube to open and fix the inner wall of the straight tube.
[0021] The present invention also provides a control method for a spherical compensator automatic welding device, comprising the following steps:
[0022] S1. Set the target position of the welding point and detect the real-time position of the welding point;
[0023] S2, initialize PID control;
[0024] S3, perform PID control according to the real-time position of the welding point;
[0025] S4, using the Kalman filter fusion algorithm to combine the height information of the displacement sensor and the plane position information of the visual sensor, and calculate the precise position of the welding point in three-dimensional space according to their measurement noise characteristics and the dynamic model of the system;
[0026] S5. Move the welding gun so that the end of the welding wire coincides with the calculated welding point position, and rotate the welding gun so that the bisector of the angle β at the welding wire and the welding point coincides.
[0027] Furthermore, PID control initialization includes proportional coefficient Kp, integral coefficient Ki, differential coefficient Kd and their respective upper and lower limits Kp_min, Kp_max, Ki_min, Ki_max, Kd_min, Kd_max; during the initialization process, the received parameters are stored in the corresponding class member variables, and previous_error, integral, target_position and previous_output are initialized to [0,0] respectively.
[0028] Furthermore, the errors error_x and error_y in the x-axis and y-axis directions are calculated by the difference between the target position target_position and the current position current_position, and the adaptive_parameter_adjustment method is called to adaptively adjust the Kp, Ki, and Kd parameters according to the error sizes in the x- and y-directions.
[0029] Furthermore, the integral term is calculated by multiplying the error by the time interval dt and adding it to integral;
[0030] The differential term is calculated specifically as follows:
[0031] Furthermore, the control outputs output_x and output_y in the x and y directions are calculated respectively, and the calculation basis is Kp×error+Ki×integral+Kd×derivative; the control output is limited, and the values of output_x and output_y are limited to the range of [-1.0,1.0] through the limit_output method.
[0032] Furthermore, the adaptive_parameter_adjustment method is specifically to dynamically adjust Kp, Ki, and Kd according to the error sizes in the x and y directions; when the absolute value of the error in the x or y direction is greater than 1.0, increase Kp and decrease Ki and Kd; when the absolute values of the errors in the x and y directions are both less than 0.1, increase Ki and Kd and decrease Kp.
[0033] Furthermore, the input control output is compared with a preset maximum output value max_output (1.0) and a preset minimum output value min_output (-1.0).
[0034] Furthermore, step S5 is specifically as follows:
[0035] S51, the initial position of the welding gun is [0,0], and the initial angle is 0 degrees;
[0036] S52, dx and dy are used as input to move the robot's position in the x and y directions accordingly and update the position variable. Call the get_position_feedback method to get the position feedback;
[0037] S53, adding random noise to simulate position feedback, the noise range is between [-0.05, 0.05], and adding the noise to the current position information;
[0038] S54, the input angle value angle is used to rotate the welding robot, the angle variable of the welding robot is updated, and the angle information after rotation is output, including the following steps:
[0039] S541. In the PID control algorithm, the init method is used to initialize the parameters of the PID controller, taking the current position current_position and the time interval dt as input; the calculated control_output is regarded as the adjustment amount for the position, which is distributed to the x and y axes, and the control_output is converted into the actual spatial movement distance to realize the position adjustment of the welding gun in the plane;
[0040] S542, according to the forward kinematics equation, calculate the required rotation angle of the welding gun; the forward kinematics equation is x=d1×cos(θ1); y=d1×sin(θ1);
[0041] Where θ1 is the rotation angle and d1 is the translation distance, cos(θ1) and sin(θ1) are trigonometric functions that convert the rotation angle into x- and y-axis direction components.
[0042] The beneficial effects of the above method are: real-time detection of the weld position and shape, and calculation of the real-time three-dimensional position of the weld point, based on which the welding robot automatically adjusts the welding path and posture; even if the workpiece at the weld point is deformed, it can ensure that the welding gun always welds along the center of the weld. Compared with the existing technology with insufficient weld tracking accuracy, the welding accuracy is greatly improved and the welding quality is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0044] Figure 1 It is a structural schematic diagram of the automatic welding device for spherical compensators of the present invention;
[0045] Figure 2 yes Figure 1 The enlarged view of point A in the middle;
[0046] Figure 3 It is a structural schematic diagram of the automatic welding device for spherical compensators of the present invention from another perspective;
[0047] Figure 4 is the front view of the sphere;
[0048] Figure 5 This is the main view of the sphere when it is welded;
[0049] In the figure: 1. ball head; 2. straight tube; 3. base; 4. chuck; 5. rotating plate; 6. drive motor; 7. bracket; 8. screw; 9. rotating block; 10. reduction motor; 11. electro-hydraulic push rod; 12. welding robot; 13. displacement sensor; 14. visual sensor; 15. connecting rod; 16. first bevel gear; 17. second bevel gear. DETAILED DESCRIPTION
[0050] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0051] Embodiment 1:
[0052] like Figure 1 and Figure 3 As shown, the present invention discloses an automatic welding device for a spherical compensator, which is used for welding a sphere. The sphere is composed of a ball head 1 and a straight tube 2. The diameter of the ball head 1 is larger than the diameter of the straight tube 2. Circumferential seam welding is performed at the connection between the ball head 1 and the straight tube 2. The ball head 1 and the straight tube 2 are fixed by spot welding.
[0053] The present invention comprises a base 3, on which two sets of parallel first and second guide rails are arranged. A movable first moving plate and a bracket 7 are installed on the first guide rail. A horizontally arranged connecting rod 15 is installed on the first moving plate, and its two ends are rotatably connected through a seat bearing. Figure 2 As shown, both ends of the connecting shaft pass through the seat bearings and are fixedly mounted with the first bevel gear 16. One end of the connecting rod 15 is connected to the driving shaft of the reduction motor 10 through a coupling so that it can rotate under the drive of the reduction motor 10.
[0054] A symmetrical and vertically arranged screw rod 8 is arranged just above both sides of the connecting rod 15, and both ends of the screw rod 8 are movably connected to the base 3 through bearings. The lower end of the screw rod 8 is connected to the second bevel gear 17, which is vertically meshed with the first bevel gear 16. A rotating block 9 is threadedly connected to the screw rod 8. A rotating plate 5 is arranged between the two rotating blocks 9, and a rotating shaft is fixedly connected to the central position of both sides of the rotating plate 5, which is rotatably connected to the rotating plate 5. An electro-hydraulic push rod 11 is connected to the side of the rotating plate 5 facing away from the bracket 7. The bottom of the cylinder of the electro-hydraulic push rod 11 is hinged with the moving plate, and the driving rod is hinged with the rotating plate 5 to drive the rotating plate 5 to rotate. When the reduction motor 10 drives the rotating plate 5 to rise and fall, in order to maintain the angle between the rotating plate 5 and the horizontal plane, the electro-hydraulic push rod 11 will start at the same time to adjust the extension length of its driving rod. Such a setting, compared with the traditional rotating plate position adjustment structure (the rotating plate 5 is installed at the driving end of the angle adjustment mechanism, and the angle adjustment structure is installed at the driving end of the lifting mechanism), the structure is simpler, the operation is more convenient, and the cost is lower.
[0055] A chuck 4 is installed on the side of the rotating plate 5 facing the bracket 7, which is used to clamp and fix the straight pipe 2. The specific installation structure is as follows: a bearing seat is installed on the rotating plate 5, and a bearing is arranged inside the bearing seat. A connecting shaft is arranged at one end of the chuck 4 facing away from the claw, and the connecting shaft passes through the rotating plate 5 and is connected to the driving motor 6 installed on the other side of the rotating plate 5, so that the chuck 4 rotates under the action of the driving motor 6.
[0056] A freely rotatable roller is installed on the top of the bracket 7 to support the ball head 1. Two rollers are provided and are in the shape of an hourglass, so that the rollers have four supporting points whose positions form a rectangle, and can stably support the ball head 1. In addition, a plurality of slots are provided on the top of the bracket 7, and the rollers are engaged in the slots. By replacing the slots in which the rollers are engaged, the spacing between the rollers can be adjusted, so that the rollers can support ball heads 1 of different diameters.
[0057] The claws of the chuck 4 extend into the inner wall of the straight tube 2 and open to fix the inner wall of the straight tube 2. This arrangement prevents the straight tube 2 from being too short, such as the claws clamping the outer wall of the straight tube 2, resulting in insufficient welding space.
[0058] A welding robot 12 is slidably connected to the second guide rail to weld the connection between the ball head 1 and the straight pipe 2. Figure 4 As shown, point a is set at the connection between the ball head 1 and the straight tube 2, and point a leads to a tangent line L with the ball head 1. The angle between L and the straight tube 2 is β. When welding, the angle between the straight tube 2 and the vertical is β / 2. And when welding, Figure 5 As shown, the bisector of the angle β is vertically arranged, so that when the welding wire is melted, it can be evenly distributed on the ball head 1 and the straight tube 2 under the action of its gravity.
[0059] A displacement sensor 13 and a visual sensor 14 are installed on the chuck 4; the displacement sensor 13 is used to detect the height displacement of the welding point of the ball head 1 and the straight tube 2, and this welding point is the highest point of the connection between the ball head 1 and the straight tube 2; the visual sensor 14 is used to acquire data on the weld groove, the front end of the molten pool and the weld forming area of the welding point, synchronously capture the weld image, and obtain the weld plane position information.
[0060] The advantages of this embodiment are as follows: 1. During welding, the angle between the straight tube 2 and the vertical direction is set so that when the welding wire and the ball head 1 are in direct contact, an isosceles triangle is formed, with the end face of the welding wire as the base and the waist being the portion of the tangent L between point a and the welding wire and the portion of the outer wall of the straight tube 2 between point a and the welding wire; during such welding, the connection between the welding wire and the ball head 1 and the straight tube 2 is evenly distributed, thereby making the strength distribution at the connection between the ball head 1 and the straight tube 2 more even; 2. The real-time position of the welding point is detected by the displacement sensor 13 and the visual sensor 14, and the position of the end face of the welding wire and the angle between the welding wire and the straight tube 2 are adjusted according to this position, so that the real-time position of the welding point coincides with the position of the end face of the welding wire. In this way, when a shape defect occurs at the welding point, the position of the end of the welding wire is immediately adjusted so that the connection strength of the weld at the defect remains consistent with that of the ball head 1 and the straight tube 2.
[0061] Embodiment 2:
[0062] The present invention also discloses a control method for a spherical compensator automatic welding device, comprising the following steps:
[0063] S1. Set the target position of the welding point and detect the real-time position of the welding point;
[0064] S2. Initialize PID control, specifically: PID control initialization includes proportional coefficient Kp, integral coefficient Ki, differential coefficient Kd and their respective upper and lower limits Kp_min, Kp_max, Ki_min, Ki_max, Kd_min, Kd_max; during the initialization process, store the received parameters in the corresponding class member variables, and initialize previous_error, integral, target_position and previous_output to [0,0] respectively;
[0065] S3. Calculate the errors error_x and error_y in the x-axis and y-axis directions through the difference between the target position target_position and the current position current_position, call the adaptive_parameter_adjustment method, and adaptively adjust the Kp, Ki, and Kd parameters according to the error sizes in the x- and y-directions to optimize the control performance;
[0066] Specifically, the integral term is calculated by multiplying the error by the time interval dt and adding it to integral; specifically, the differential term is calculated by the rate of change of the error (the difference between the current error and the previous error divided by the time interval dt);
[0067] Calculate the control outputs output_x and output_y in the x and y directions respectively, and the calculation basis is Kp×error+Ki×integral+Kd×derivative; limit the control outputs, and limit the values of output_x and output_y to the range of [-1.0,1.0] through the limit_output method to ensure the stability and safety of the outputs; store the current error as the previous error for the next calculation, and store the current control output as the previous control output for the next calculation;
[0068] Calculate the control outputs output_x and output_y in the x and y directions respectively, and the calculation basis is Kp×error+Ki×integral+Kd×derivative; limit the control outputs, and limit the values of output_x and output_y to the range of [-1.0,1.0] through the limit_output method;
[0069] The adaptive_parameter_adjustment method is to dynamically adjust Kp, Ki, and Kd according to the error size in the x and y directions; when the absolute value of the error in the x or y direction is greater than 1.0, increase Kp and reduce Ki and Kd to speed up the response of the system; when the absolute value of the error in the x and y directions is less than 0.1, increase Ki and Kd and reduce Kp to eliminate the steady-state error; in other cases, keep the parameters unchanged;
[0070] Compare the input control output with the preset maximum output value max_output (1.0) and minimum output value min_output (-1.0) to ensure that the output is within the specified range;
[0071] S4, using the Kalman filter fusion algorithm to combine the height information of the displacement sensor 13 and the plane position information of the visual sensor 14, and calculate the precise position of the welding point in the three-dimensional space according to their measurement noise characteristics and the dynamic model of the system; specifically:
[0072] Define the system state vector x, including position and velocity information; define the observation vector z, which is composed of the measurement values of the displacement sensor 13 and the visual sensor 14; determine the state transfer matrix A according to the dynamic characteristics; assume that in a discrete time system where the target moves at a uniform speed, the state transfer matrix can be expressed as:
[0073]
[0074] Where Δt is the time interval; the observation matrix H is used to map the system state to the observation space, and its form is:
[0075]
[0076] This matrix builds a direct connection between the system state and the sensor observations, preparing for subsequent Kalman filter calculations;
[0077] Noise initialization: The process noise ω follows a Gaussian distribution with a mean of 0 and a covariance matrix of Q. Q is determined according to the system characteristics. The observation noise v follows a Gaussian distribution with a mean of 0 and a covariance matrix of R. R is determined according to the sensor accuracy. The noise-related settings are completed; Kalman filter prediction is performed based on the state estimation at the previous moment. And the state transfer matrix A, predict the current state, and get At the same time, based on the state estimation covariance matrix p_(k|k-1) at the previous moment, the state transfer matrix A and the process noise covariance matrix Q, the state estimation covariance matrix at the current moment is predicted
[0078] P k|k-1 -AP k|k-1 A T +Q
[0079] This step makes a preliminary estimate of the current state through the dynamic model of the system; calculates the Kalman gain: K k =P k|k-1 H T (HP k|k-1 +R) -1 ,Update status:
[0080] Update covariance: P k|k =(IK k H)P k|k-1 , where I is the identity matrix.
[0081] By fusing the data, a more comprehensive and accurate weld position and state information is obtained, including the weld's spatial position (x, y, z coordinates), shape (width, depth, curvature, etc.) and motion trend (speed, acceleration, etc.). The main controller (703) calculates the deviation between the actual position of the weld and the preset ideal position based on the fused data. The PID control algorithm is used to calculate the control amount based on the deviation. The control amount calculated by the PID control algorithm is used to generate specific control instructions. These control instructions are usually adjustment commands for the speed, position, acceleration, etc. of the welding robot 12.
[0082] S5. Move the welding gun so that the end of the welding wire coincides with the calculated welding point position, and rotate the welding gun so that the bisector of the angle β between the welding wire and the welding point coincides, specifically:
[0083] S51, the initial position of the welding gun is [0,0], and the initial angle is 0 degrees;
[0084] S52, dx and dy are used as input to move the robot's position in the x and y directions accordingly and update the position variable. Call the get_position_feedback method to get the position feedback;
[0085] S53, adding random noise to simulate position feedback, the noise range is between [-0.05, 0.05], and adding the noise to the current position information;
[0086] S54, the input angle value angle is used to rotate the welding robot 12, the angle variable of the welding robot 12 is updated, and the angle information after rotation is output, including the following steps:
[0087] S541. In the PID control algorithm, the init method is used to initialize the parameters of the PID controller, taking the current position current_position and the time interval dt as input; the calculated control_output is regarded as the adjustment amount for the position, which is distributed to the x and y axes, and the control_output is converted into the actual spatial movement distance to realize the position adjustment of the welding gun in the plane;
[0088] S542, according to the forward kinematics equation, calculate the required rotation angle of the welding gun; the forward kinematics equation is x=d1×cos(θ1); y=d1×sin(θ1);
[0089] Where θ1 is the rotation angle and d1 is the translation distance, cos(θ1) and sin(θ1) are trigonometric functions that convert the rotation angle into x- and y-axis direction components.
[0090] The beneficial effects of the above method are: real-time detection of the weld position and shape, and calculation of the real-time three-dimensional position of the weld point, and the welding robot 12 automatically adjusts the welding path and posture accordingly; even if the workpiece at the weld point is deformed, it can ensure that the welding gun always welds along the center of the weld. Compared with the existing technology with insufficient weld tracking accuracy, the welding accuracy is greatly improved and the welding quality is ensured.
[0091] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. An automatic welding device for spherical compensators, used for welding a sphere, wherein the sphere is composed of a ball head (1) and a straight tube (2), and the connection is performed by girth welding, and the ball head (1) and the straight tube (2) are fixed by spot welding, characterized in that: The invention comprises a base (3), on which is arranged: A chuck (4) is used to grab and fix the straight tube (2); the chuck (4) is mounted on a rotating plate (5) and is rotatably connected to the rotating plate (5); A driving motor (6) drives the chuck (4) to rotate; A bracket (7) for supporting the ball head (1); The screw rod (8) is arranged vertically, and its upper and lower ends are movably connected to the base (3) through bearings; A rotating block (9) is threadedly connected to the screw rod (8) and movably connected to the rotating plate (5), so that the rotating plate (5) can rotate up and down; A reduction motor (10), a driving end of which is connected to one end of the screw rod (8) to drive the screw rod (8) to rotate; An electro-hydraulic push rod (11), whose cylinder body is hinged to the bottom plate (3) and whose driving end is hinged to the opening and closing end of the rotating plate (5), and is used to drive the rotating plate (5) to rotate; A welding robot (12) with a welding gun pointing vertically downwards performs welding on the connection between the ball head (1) and the straight pipe (2); When the reduction motor (10) drives the rotating plate (5) to move up and down, the electro-hydraulic push rod (11) is started at the same time; A point a is set at the connection between the ball head (1) and the straight pipe (2), and a tangent line L to the ball head (1) is drawn from point a. The angle between L and the straight pipe (2) is β. During welding, the angle between the straight pipe (2) and the vertical direction is β / 2. The chuck (4) is mounted with a displacement sensor (13) and a visual sensor (14); The displacement sensor (13) is used to detect the height displacement of the welding point between the ball head (1) and the straight pipe (2); The visual sensor (14) is used to acquire data on the weld groove, the front end of the molten pool and the weld forming area at the welding location, synchronously photograph the weld image, and acquire the weld plane position information.
2. The automatic welding device for spherical compensators according to claim 1 is characterized in that: The clamping claws of the chuck (4) extend into the inner wall of the straight tube (2) and open to fix the inner wall of the straight tube (2).
3. A control method for a spherical compensator automatic welding device, characterized in that: The automatic welding device for spherical compensators according to claim 1 is characterized in that it comprises the following steps: S1. Set the target position of the welding point and detect the real-time position of the welding point; S2, initialize PID control; S3, perform PID control according to the real-time position of the welding point; S4, using a Kalman filter fusion algorithm to combine the height information of the displacement sensor (13) and the plane position information of the visual sensor (14), and calculating the precise position of the welding point in three-dimensional space according to their measurement noise characteristics and the dynamic model of the system; S5. Move the welding gun so that the end of the welding wire coincides with the calculated welding point position, and rotate the welding gun so that the bisector of the angle β at the welding wire and the welding point coincides.
4. The control method of the spherical compensator automatic welding device according to claim 3 is characterized in that: PID control initialization includes proportional coefficient Kp, integral coefficient Ki, differential coefficient Kd and their respective upper and lower limits Kp_min, Kp_max, Ki_min, Ki_max, Kd_min, Kd_max; during the initialization process, the received parameters are stored in the corresponding class member variables, and previous_error, integral, target_position and previous_output are initialized to [0,0] respectively.
5. The control method of the spherical compensator automatic welding device according to claim 4 is characterized in that: The errors error_x and error_y in the x-axis and y-axis directions are calculated by the difference between the target position target_position and the current position current_position, and the adaptive_parameter_adjustment method is called to adaptively adjust the Kp, Ki, and Kd parameters according to the error sizes in the x- and y-directions.
6. The control method of the spherical compensator automatic welding device according to claim 5 is characterized in that: The integral term is calculated by multiplying the error by the time interval dt and adding it to integral; The differential term is calculated specifically as follows:
7. The control method of the spherical compensator automatic welding device according to claim 6 is characterized in that: Calculate the control outputs output_x and output_y in the x and y directions respectively, and the calculation basis is Kp×error+Ki×integral+Kd×derivative; limit the control outputs and limit the values of output_x and output_y to the range of [-1.0,1.0] through the limit_output method.
8. The control method of the spherical compensator automatic welding device according to claim 7 is characterized in that: The adaptive_parameter_adjustment method is specifically to dynamically adjust Kp, Ki, and Kd according to the error size in the x and y directions; when the absolute value of the error in the x or y direction is greater than 1.0, increase Kp and reduce Ki and Kd; when the absolute value of the error in the x and y directions is less than 0.1, increase Ki and Kd and reduce Kp.
9. The control method of the spherical compensator automatic welding device according to claim 8 is characterized in that: The input control output is compared with the preset maximum output value max_output (1.0) and minimum output value min_output (-1.0).
10. The control method of the spherical compensator automatic welding device according to claim 9, characterized in that: Step S5 specifically includes: S51, the initial position of the welding gun is [0,0], and the initial angle is 0 degrees; S52, dx and dy are used as input to move the robot's position in the x and y directions accordingly and update the position variable. Call the get_position_feedback method to get the position feedback; S53, adding random noise to simulate position feedback, the noise range is between [-0.05, 0.05], and adding the noise to the current position information; S54, performing a rotation operation on the welding robot (12) using the input angle value angle, updating the angle variable of the welding robot (12), and outputting angle information after rotation, comprising the following steps: S541. In the PID control algorithm, the init method is used to initialize the parameters of the PID controller, taking the current position current_position and the time interval dt as input; the calculated control_output is regarded as the adjustment amount for the position, which is distributed to the x and y axes, and the control_output is converted into the actual spatial movement distance to realize the position adjustment of the welding gun in the plane; S542, calculating the required rotation angle of the welding gun according to the forward kinematics equation; the forward kinematics equation is x=d1×cos(θ1); y=d1×sin(θ1); Where θ1 is the rotation angle and d1 is the translation distance, cos(θ1) and sin(θ1) are trigonometric functions that convert the rotation angle into x- and y-axis direction components.