Welding control method, electronic equipment and computer readable storage medium

By applying reinforcement learning and artificial intelligence technology in the welding system, real-time data collection and energy consumption optimization prediction are solved, which solves the problem of low timeliness of energy consumption monitoring and optimization in the existing welding process, and realizes real-time monitoring and optimization of the energy consumption of the welding system. Adjustment.

CN118550202AActive Publication Date: 2024-08-27中科先进(深圳)集成技术有限公司

Patent Information

Application Number
CN202411023068.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-08-27
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

The existing welding process has low timeliness when monitoring and optimizing energy consumption, and cannot adapt to complex and changeable welding environments and workpiece characteristics in a timely manner, resulting in poor adjustment effects.

Method used

Reinforcement learning technology and artificial intelligence are used to build an enhanced model, collect welding data in real time, optimize energy consumption predictions through the enhanced model, adjust welding parameters based on the predicted data, and monitor and optimize the welding process in real time.

Benefits of technology

It improves the timeliness and effect of welding energy consumption monitoring and optimization, can adapt to complex and changeable welding environments and workpiece characteristics, and realizes real-time monitoring and optimization adjustment of welding system energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550202A
    Figure CN118550202A
Patent Text Reader

Abstract

The invention discloses a welding control method, electronic equipment and a computer readable storage medium, and the welding control method comprises the steps that welding data are collected in real time in the welding process of a welding system to obtain current first state data; inputting the first state data into a strengthening model to obtain prediction data output by the strengthening model; and based on the prediction data, controlling the welding system under the first state data to execute a first adjustment action so as to perform energy consumption optimization on the adjusted welding system. By means of the mode, the welding control method can obtain the first adjustment action, predicted based on the first state data, of energy consumption optimization of the welding system through the strengthening model, so that the welding system continues to conduct welding after executing the first adjustment action, and real-time monitoring and optimization adjustment of the welding process energy consumption by the welding system are achieved; and the optimization effect and timeliness of energy consumption monitoring optimization are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to welding control methods, electronic devices, and computer-readable storage media. Background Technology

[0002] With the rapid development of automation technology, welding processes are being used more and more widely. However, energy consumption during welding is a key concern, as excessive energy consumption not only increases production costs but may also have negative environmental impacts. Therefore, monitoring and optimizing the energy consumption of welding processes is of great significance and has broad application prospects.

[0003] Currently, existing technologies for energy consumption monitoring and optimization typically involve recording energy consumption data during the welding process. This data is large, requiring users to analyze it to obtain simple optimization strategies, such as adjusting fixed parameters or using experience-based optimization methods. However, these methods often fail to adjust the welding process in a timely manner, resulting in poor adjustment effects and low timeliness of energy consumption monitoring and optimization. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a welding control method, electronic equipment, and a computer-readable storage medium.

[0005] To address the aforementioned problems, this application provides a first technical solution: a welding control method applied to a welding system, the welding control method comprising: real-time acquisition of welding data of the welding system during the welding process to obtain current first state data; inputting the first state data into a strengthening model to obtain predicted data output by the strengthening model; and, based on the predicted data, controlling the welding system under the first state data to perform a first adjustment action to optimize the energy consumption of the adjusted welding system.

[0006] Optionally, after the step of controlling the welding system under the first state data to perform a first adjustment action based on the predicted data so that the adjusted welding system continues to weld, the welding control method further includes: collecting welding data during welding by the adjusted welding system to obtain second state data; calculating first reward data of the welding system under the first state data based on the second state data; and storing the first state data, the first adjustment action, the first reward data, and the second state data as a sample data in a sample dataset.

[0007] Optionally, the predicted data includes the expected state data predicted by the welding system when performing the first adjustment action; after the step of collecting welding data to obtain the second state data when the adjusted welding system performs welding, the welding control method further includes: updating the enhancement model based on the first reward data and / or the second state data when the difference between the second state data and the expected state data is greater than a first set threshold.

[0008] Optionally, after the step of storing the first state data, the first adjustment action, the first reward data, and the second state data as a sample data in a sample dataset, the welding control method includes: when the sample dataset meets a first preset condition, calculating a first loss function for all the sample data in the sample dataset; calculating the gradient of the sample dataset based on the first loss function of all the sample data, and updating the reinforcement model based on the gradient.

[0009] Optionally, the calculation of the first reward data of the welding system under the first state data based on the second state data includes: obtaining the deviation value between the weld and the ideal weld after the welding system performs the first adjustment action under the first state data, and calculating the welding quality data of the welding system based on the deviation value; obtaining the welding speed of the welding system after performing the first adjustment action under the first state data, and calculating the welding efficiency data of the welding system based on the welding speed; obtaining the power value consumed by the welding system when performing the first adjustment action under the first state data, and calculating the energy consumption data of the welding system based on the power value; and performing a weighted summation of the welding quality data, the welding efficiency data, and the energy consumption data to obtain the first reward data.

[0010] Optionally, before the step of inputting the first state data into the enhancement model to obtain the predicted data output by the enhancement model, the welding control method further includes: constructing a model to be trained based on the characteristic differences of different welding tasks; obtaining training datasets under different welding tasks, the training datasets including first training states; inputting the first training states of each welding task into the model to be trained to obtain the predicted values ​​output by the model to be trained under the first training states; calculating a second loss function of the model to be trained under the first training states based on the predicted values, so as to update the parameters of the model to be trained based on each of the second loss functions.

[0011] Optionally, the above-mentioned calculation of the second loss function of the model to be trained in the first training state based on the predicted value, and the parameter update of the model to be trained based on each of the second loss functions, includes: selecting and executing the second adjustment action of the welding system based on the predicted value to obtain the first training reward and the second training state of the adjusted welding system after executing the second adjustment action; calculating the training prediction value and training target value of the model to be trained based on the first training state, the second training state, and the first training reward; and calculating the second loss function based on the training prediction value and the training target value, and the parameter update of the model to be trained based on each of the second loss functions.

[0012] Optionally, after the steps of calculating the second loss function of the model to be trained under the first training state based on the predicted value, and updating the parameters of the model to be trained based on each of the second loss functions, the welding control method further includes: calculating the evaluation index of the model to be trained; in response to the evaluation index satisfying a second preset condition, obtaining the test dataset of the model to be trained; inputting the test dataset into the model to be trained to evaluate and verify the model to be trained after multiple training iterations; and outputting the verified model to be trained as the reinforcement model.

[0013] To address the aforementioned problems, this application provides a second technical solution: an electronic device including a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the welding control method described above.

[0014] To address the aforementioned problems, this application provides a third technical solution: a computer-readable storage medium storing program instructions that can be executed by a processor to implement the welding control method described above.

[0015] Unlike existing technologies, the welding control method of this application acquires welding data in real time during the welding process to obtain current first-state data; inputs the first-state data into a strengthening model to obtain predicted data output by the strengthening model; and, based on the predicted data, controls the welding system under the first-state data to perform a first adjustment action to optimize the energy consumption of the adjusted welding system. Through this method, the welding control method of this application can obtain the first adjustment action for energy consumption optimization of the welding system based on the predicted first-state data through the strengthening model, allowing the welding system to continue welding after executing the first adjustment action. This achieves real-time monitoring and optimization of the welding process energy consumption, improving the optimization effect and timeliness of energy consumption monitoring and optimization. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic flowchart of the first embodiment of the welding control method provided in this application; Figure 2 This is a flowchart illustrating the second embodiment of the welding control method provided in this application; Figure 3 This is a flowchart illustrating the third embodiment of the welding control method provided in this application; Figure 4 This is a flowchart illustrating the fourth embodiment of the welding control method provided in this application; Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application; Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0019] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0020] Specifically, existing technologies for energy consumption monitoring and optimization often rely on energy consumption data recorded by energy sensors to provide simple optimization strategies, such as adjusting fixed parameters or using experience-based optimization methods. These strategies are often limited. Since welding processes can be applied to various welding scenarios, existing technologies often cannot adapt to the complex and changing welding environment and workpiece characteristics, resulting in poor adjustment and energy consumption optimization.

[0021] In view of this, embodiments of this application construct a reinforcement model for energy consumption optimization prediction using reinforcement learning and artificial intelligence technologies, and use the reinforcement model to assist in welding control, so as to optimize and adjust the energy consumption of the welding process under the state data of the real-time welding environment.

[0022] Please see Figure 1 , Figure 1 This is a schematic flowchart of the first embodiment of the welding control method provided in this application. Figure 1 As shown in the embodiment of this application, a welding control method is proposed and applied to a welding system. The welding control method includes the following steps: Step S11: Real-time acquisition of welding data of the welding system during the welding process to obtain the current first state data.

[0023] Specifically, after receiving a welding task, the welding system performs welding operations on a workpiece to be welded. During the welding process, the welding environment of the workpiece will change and fluctuate. For example, at least one parameter such as welding voltage, welding current, current energy consumption, welding speed, welding temperature, welding head position, and welding angle will change and fluctuate. If welding optimization is performed only based on the original welding table, original welding conditions, and initial welding environment of the welding task, the adjusted welding system will not be able to weld under optimal conditions, resulting in poor optimization effect and low timeliness of energy consumption monitoring optimization.

[0024] This application embodiment acquires welding data of the welding system in real time during the welding process to obtain first state data of the welding system under the current environmental conditions. The welding data includes, but is not limited to, at least one type of state parameter such as welding voltage, welding current, current energy consumption, welding speed, and welding temperature. In an optional embodiment, corresponding monitoring devices such as voltage sensors, current sensors, and energy consumption meters can be installed on the welding head, robotic arm, or welding robot of the welding system to acquire the current first state data. Step S12: Input the first state data into the strengthening model to obtain the predicted data output by the strengthening model.

[0025] After obtaining the first-state data, the real-time collected first-state data is continuously input into the reinforcement model to obtain the predicted data output by the reinforcement model corresponding to the first-state data. The predicted data provides relevant adjustment suggestions for adjusting and optimizing the welding parameters of the welding system to reduce energy consumption under the first-state data. The reinforcement model can be constructed using reinforcement learning and artificial intelligence techniques. The constructed reinforcement model is further processed using MAML (Model-Agnostic Meta-Learning) or RL... 2 Meta-learning algorithms such as Reinforcement Learning Squared are used for training and evaluation to be suitable for energy consumption optimization prediction of welding parameters in welding systems.

[0026] Furthermore, the enhancement model can also generate corresponding predicted data based on the current welding task requirements of the welding system, the material properties of the workpiece to be welded, and the first state data. The welding task requirements and material properties can be obtained through the relevant setting parameters of the original welding table; when order requirements and / or production needs change, the above task requirements and material properties can also be input into the enhancement model for adjustment, without specific limitations here.

[0027] Step S13: Based on the predicted data, control the welding system under the first state data to perform the first adjustment action to optimize the energy consumption of the adjusted welding system.

[0028] Specifically, the predicted data can include multiple welding parameter adjustment actions and the predicted value data corresponding to each adjustment action. Adjustment actions include, but are not limited to, adjusting welding current, welding speed, wire feed speed, welding head position, and welding angle. The predicted value data represents the expected total return from the current state to the future state after taking a certain adjustment action and following a certain strategy in a given state (i.e., first state data). Based on multiple adjustment actions and their corresponding predicted value data in the predicted data, a first adjustment action suitable for energy consumption optimization of the welding system can be selected from the predicted data. The welding system under the first state data is then controlled to execute the first adjustment action to optimize the energy consumption of the adjusted welding system and allow the optimized welding system to continue welding. In this way, the first state data collected in real time during the welding process can be continuously input into the strengthening model. Based on the predicted data output by the strengthening model, the welding system can be controlled to execute the first adjustment action, thereby minimizing the energy consumption of the welding system and improving the energy consumption optimization effect.

[0029] Furthermore, after the adjusted welding system continues welding based on the enhancement model's adjustment suggestions, the welding results can be output to the user through a visual interface or charts. This allows the user to monitor the welding optimization process and make subsequent process adjustments based on the welding results. For example, if the user finds that the optimized welding quality still does not meet the requirements, the quality can be improved by reducing the welding speed or increasing the welding current. If the user finds that the welding efficiency is low, the welding speed can be increased or unnecessary downtime can be reduced to improve welding efficiency. Additionally, the welding results can be stored in a relevant sample database for subsequent data analysis and model improvement.

[0030] In this application, the welding control method acquires welding data in real time during the welding process to obtain current first-state data; inputs the first-state data into a strengthening model to obtain predicted data output by the strengthening model; and, based on the predicted data, controls the welding system under the first-state data to perform a first adjustment action to optimize the energy consumption of the adjusted welding system. Through this method, the welding control method of this embodiment can obtain a first adjustment action for energy consumption optimization of the welding system based on the predicted first-state data through the strengthening model, allowing the welding system to continue welding after performing the first adjustment action. This achieves real-time monitoring and optimization of the welding process energy consumption, improving the optimization effect and timeliness of energy consumption monitoring and optimization.

[0031] In one embodiment, please refer to Figure 2 , Figure 2 This is a schematic flowchart of the second embodiment of the welding control method provided in this application. Figure 2As shown, after step S13, the welding control method of this embodiment further includes: Step S21: During welding in the adjusted welding system, welding data is collected to obtain second state data.

[0032] Specifically, during the welding process of the welding system, welding data is continuously collected through monitoring equipment, and data collection continues after the welding system performs the first adjustment action to obtain second state data. In a possible implementation, the first state data includes first energy consumption data, and the second state data includes second energy consumption data. The first energy consumption data before the welding system performs the first adjustment action is greater than or equal to the second energy consumption data after the welding system performs the first adjustment action, so as to achieve energy consumption optimization of the adjusted welding system. Step S22: Based on the second state data, calculate the first reward data of the welding system under the first state data.

[0033] Specifically, the first reward data is the immediate reward obtained by the welding system after performing the first adjustment action under the first state data. The first reward data is used to represent the feedback received by the welding system when performing the first adjustment action. Depending on the task objectives of the application scenario, the first reward data is related to parameters such as welding quality, welding efficiency / speed, and energy consumption of the welding system under the first state data, and is not specifically limited here.

[0034] Step S23: Store the first state data, the first adjustment action, the first reward data, and the second state data as a sample data in the sample dataset.

[0035] After calculating the first reward data, the first state data, the first adjustment action, the first reward data, and the second state data are stored as a sample data in the sample dataset. Understandably, this sample data can be stored in the sample dataset after each training and energy consumption optimization prediction of the reinforcement model, so that each sample data in the sample dataset can be understood as an experience point for the reinforcement model. The reinforcement model is used to predict welding parameters and adjustment measurements suitable for the current welding environment or task characteristics based on the experience of different welding tasks in the sample database when facing different welding tasks. This allows the reinforcement model's prediction data to adapt to complex and changing welding environments and workpiece characteristics.

[0036] Furthermore, data analysis can be performed on the experience in the sample database to extract relevant information and patterns for subsequent welding data analysis and improvement of the strengthening model. For example, the optimal combination of welding parameters for different welding tasks can be determined by analyzing the impact of different state data (e.g., welding speed, welding current, welding voltage, etc.) on welding quality, welding efficiency, and energy consumption. Alternatively, the experience of anomalies in the welding process can be analyzed, such as analyzing abnormal data with large deviations under the same welding task, to identify potential faults and provide corresponding solutions. The impact of different welding parameters and welding processes on energy consumption can also be evaluated empirically to optimize energy efficiency. Or, the influencing factors of energy consumption or other welding results can be obtained by studying the correlation between different variables (e.g., welding parameters, workpiece material type, ambient temperature, etc.).

[0037] In this embodiment of the application, the welding control method stores the first state data, the first adjustment action, the first reward data, and the second state data as a sample data in a sample dataset. This allows the sample data in the sample dataset to serve as the basis for subsequent data analysis, optimization prediction, etc., by the strengthening model. This enables the strengthening model to continuously learn and adapt to new welding environments and workpiece characteristics, improves the prediction accuracy of the strengthening model, and thus improves the optimization effect and timeliness of energy consumption monitoring and optimization.

[0038] Optionally, the prediction data also includes the expected state data predicted by the welding system performing the first adjustment action. After step S21, the welding control method of this embodiment further includes: updating the reinforcement model based on the first reward data and the second state data when the difference between the second state data and the expected state data is greater than a first set threshold.

[0039] Specifically, the welding control method of this embodiment can obtain the expected state data of the welding system generated based on the optimization algorithm through the prediction data of the reinforcement model. The expected state data is used to indicate the expected welding parameters of the welding system after performing a certain adjustment action. After obtaining the second state data, the second state data is compared with the expected state data to obtain the difference value between the second state data and the expected state data. When the difference value between the second state data and the expected state data is greater than a first set threshold, that is, there is a large deviation between the actual welding state and the expected state after the welding system performs the first adjustment action. The large deviation may be due to changes in the material properties of the workpiece to be welded, instability in the equipment state of the welding system, or large changes in the environmental state. Therefore, when it is determined that the difference value between the second state data and the expected state data is greater than the first set threshold, the reinforcement model is updated based on the first reward data and / or the second state data.

[0040] The enhancement model can be updated based on the first reward data and / or the second state data in at least one of the following ways: calculating a loss function based on the second state data and the first reward data, and updating the model parameters of the enhancement model based on the loss function; or, re-matching the characteristics of the welding task based on the second state data, so that the enhancement model can re-predict energy consumption optimization based on the characteristics of the second state data; or, updating the optimization algorithm used by the enhancement model based on at least one of the first reward data and the second state data, so that the updated enhancement model can be applied to the current welding environment; or, determining whether the welding system has experienced equipment abnormality based on at least one of the first reward data and the second state data, so as to generate a warning message when the welding system is determined to have experienced equipment abnormality.

[0041] In this embodiment, the welding control method updates the reinforcement model based on the first reward data and the second state data when the difference between the second state data and the expected state data is greater than a first set threshold. This allows the reinforcement model to be adjusted in real time when a prediction deviation occurs during the welding process of the welding system. This enables the welding system of this embodiment to adapt to complex and changing welding environments and workpiece characteristics, and improves the optimization effect and timeliness of energy consumption monitoring and optimization.

[0042] Optionally, in one embodiment, after step S23, the welding control method includes: when the sample dataset meets a first preset condition, calculating a first loss function for all sample data in the sample dataset; calculating the gradient of the sample dataset based on the first loss function of all sample data, and updating the reinforcement model based on the gradient.

[0043] Specifically, the sample dataset meeting the first preset condition may include: the number of samples in the dataset exceeds a second preset threshold, meaning the collected sample dataset reaches a certain order of magnitude, allowing the reinforcement model to be updated based on the gradient calculated from the sample dataset; or, performing data analysis on all sample data in the dataset to obtain the difference between the second-state data and the expected-state data in each sample, and performing a dispersion analysis on the difference values ​​of all sample data, for example, by calculating parameters such as the standard deviation and coefficient of variation of the difference values ​​between the second-state data and the expected-state data in all sample data. When the result of the dispersion analysis exceeds a third preset threshold, the sample dataset is determined to meet the first preset condition, and the reinforcement model is updated in the above manner.

[0044] After determining that the sample dataset meets the first preset condition, the first loss function of all sample data in the sample dataset is calculated. For each sample data in the sample dataset, it can be calculated in the following way: based on the first reward data and the second state data of each sample data, the target value data of the sample data is calculated, and the first loss function of the sample dataset is calculated based on the predicted value data and the target value data in each sample data. The calculation process is shown in Equation (1): (1) Among them, L( ) is the first loss function; N is the number of samples in the sample dataset; It is the prediction value data obtained by the reinforcement network based on the i-th sample data out of N sample data. This is the first state data of the welding system. This is the first adjustment action for the welding system. These are the parameters of the reinforcement model; It is the target value data, which is usually calculated using the Bellman equation.

[0045] To calculate the target value data of the i-th sample data, we can determine the future reward that the enhancement model can obtain by performing all possible adjustment actions under the future second state data based on the second state data of the sample data. Based on the first reward data of the sample data and the sum of the future rewards, we can calculate the target value data of the welding system. The calculation process of the target value data is shown in Equation (2): (2) in, The first adjustment action is to be performed. After the first state data The first reward data obtained below; It is a discount factor, used to weigh the importance of future rewards. It uses a reinforcement model in the second-state data For all possible adjustment actions Predicted future rewards.

[0046] After obtaining the first loss function of the sample dataset, calculate the first loss function with respect to the model parameters. The partial derivative vector, obtained through the gradient operator The formula (3) represents: (3) in, It is a parameter Dimensions.

[0047] After calculating the gradient of the sample dataset, a learning rate is set. To control the step size of parameter updates; to enhance the model parameters. Updated according to the following rules: .

[0048] In this way, when the sample dataset meets the first preset condition (such as the accumulation of data reaching a certain level, the performance degradation exceeding a certain threshold, etc.), the model parameters of the reinforcement model can be updated online. The model parameters are updated immediately when the sample data of the sample dataset arrives, so as to adapt to the changes in the welding environment. This allows the reinforcement model to continuously learn and adapt to new welding environments and workpiece characteristics, improve the prediction accuracy of the reinforcement model, and thus improve the optimization effect and timeliness of energy consumption monitoring.

[0049] Optionally, in other embodiments, the determination of whether to update the model parameters can also be made by: acquiring the performance data of the welding system after welding under the adjusted welding parameters; in response to the performance data being less than a first preset threshold, performing the step of updating the strengthening model; or, in response to the difference between the environmental data of the welding system under the first state data and the second state data being greater than a second preset threshold, performing the step of updating the strengthening model; or, it can include sample datasets collected over multiple time periods, and after the newly collected sample dataset meets the first preset condition, obtaining the difference between the data distribution of the newly collected sample dataset and the data distribution of the previous sample dataset, and if the difference is significant, performing the step of updating the strengthening model.

[0050] The aforementioned performance data refers to the performance indicators of the welding system during the welding process, such as the accuracy of welding quality and the stability of welding speed. The aforementioned environmental data may include relevant factors of the welding environment, such as welding temperature, welding humidity, and the material type of the workpiece to be welded. The differences in the data distribution of the aforementioned sample dataset can be obtained through statistical testing (such as the Kolmogorov-Smirnov test, Anderson-Darling test, etc.), and are not specifically limited here.

[0051] Furthermore, after updating the model parameters of the strengthening model in the above manner, the test dataset needs to be input into the updated strengthening model to evaluate and verify the strengthening model, so as to ensure that the performance of the strengthening model is improved and meets the actual welding environment.

[0052] Optionally, the first reward function is the immediate reward of the welding system after performing the first adjustment action under the first state data. See also... Figure 3 , Figure 3This is a flowchart illustrating the third embodiment of the welding control method provided in this application. Figure 3 As shown, in the welding control method of this embodiment, step S22 further includes: Step S31: Obtain the deviation value between the weld and the ideal weld after the welding system performs the first adjustment action under the first state data, and calculate the welding quality data of the welding system based on the deviation value.

[0053] Specifically, during the process of acquiring a welding task and welding the workpiece, the welding system generates a corresponding ideal weld based on the position to be welded. When the welding system performs the first adjustment action, the deviation value between the weld of the welding system and the ideal weld can be obtained by monitoring sensors, etc., so as to calculate the welding quality data of the welding system based on the deviation value. The specific calculation formula is shown in equation (4): (4) in, This is the current first state data. Execute the first adjustment action The width deviation between the final weld and the ideal weld; It is a positive number used to adjust the degree of influence of the deviation value on the welding quality. The welding quality of the welding system is mapped to the interval (0, 1) by Equation (4), and the closer the value of the welding quality data is to 1, the better the welding quality.

[0054] Step S32: Obtain the welding speed of the welding system after performing the first adjustment action under the first state data, and calculate the welding efficiency data of the welding system based on the welding speed.

[0055] Specifically, the welding speed of the welding system can be obtained by calculating the length of weld completed per unit time. The welding efficiency data of the welding system can be calculated based on the welding speed. The specific calculation formula is shown in equation (5): (5) in, This is the current first state data. Execute the first adjustment action The subsequent welding speed, This is the maximum welding speed of the welding system. This expression maps the welding efficiency to the range of [0, 1], and the closer the welding efficiency data is to 1, the higher the efficiency.

[0056] Step S33: Obtain the power value consumed by the welding system when performing the first adjustment action under the first state data, and calculate the energy consumption data of the welding system based on the power value.

[0057] Specifically, the energy consumption of the welding system can be defined by electrical energy consumption, and the power consumed by the welding system when performing the first adjustment action under the first state data is obtained by monitoring devices such as power sensors. The energy consumption data of the welding system is calculated based on the power value, and the specific calculation formula is shown in Equation (6): (6) in, This is the current first state data. Execute the first adjustment action Power consumption at that time It is the duration of the first adjustment action. The lower the energy consumption data, the less energy the welding system consumes.

[0058] Step S34: Perform a weighted summation of the welding quality data, welding efficiency data, and energy consumption data to obtain the first reward data.

[0059] After obtaining welding quality data, welding efficiency data, and energy consumption data, a weighted sum is performed on these data to obtain the first reward data. The formula for calculating the first reward data is shown in equation (7): (7) in, , and These are the weighting parameters for welding quality data, welding efficiency data, and energy consumption data, respectively. The weighting parameters for each data point in these categories can be determined by the actual needs of the welding system. For example, if the welding system has a greater need to improve welding quality, the weighting parameters for each data point in these categories can be set to 4, 3, and 3, respectively. Other weighting methods are also possible, and no specific limitations are imposed here.

[0060] Understandably, in this embodiment, the immediate reward obtained by the welding system after performing the first adjustment action can be related to the welding quality, efficiency, energy consumption, and other result data of the welding system. Therefore, the first reward data can be obtained by calculating the welding quality data, welding efficiency data, and energy consumption data of the welding system after performing the first adjustment action. This ensures that the reinforcement model maintains a balance between the welding quality, welding efficiency, and energy consumption of the welding system when optimizing and predicting the welding process, thus avoiding problems such as poor welding quality and low efficiency caused by excessively low energy consumption reduction, and improving the optimization effect of the welding system. Under other application scenarios and task objectives, the reward data can also incorporate other data for design. For example, when the reinforcement model has no requirements for the efficiency of the welding system, the first reward data can be composed of welding quality data and energy consumption data, without specific limitations here.

[0061] In one embodiment, please refer to Figure 4 , Figure 4 This is a flowchart illustrating the fourth embodiment of the welding control method provided in this application. Figure 4 As shown, before step S12, the welding control method of this embodiment further includes: Step S41: Construct a training model based on the characteristics of different welding tasks.

[0062] Specifically, for different types of welding tasks, at least one of the following may differ: the welding environment of the welding system, the workpiece material, the welding parameters, and the desired welding result. To ensure that the enhancement model can achieve good predictive performance when facing different types of welding tasks, this embodiment requires task definition based on the characteristics of different welding tasks when constructing the enhancement model, in order to determine the model framework of the model to be trained.

[0063] For different welding tasks, the state data of the task can generally include at least one of the following: welding voltage, welding current, energy consumption, welding speed, and welding temperature. The welding actions that need to be adjusted for the state can include at least one of the following: adjusting welding current, adjusting welding speed, adjusting wire feed speed, adjusting welding head position, and adjusting welding angle. Therefore, the neurons of the input layer of the model to be trained can be determined based on the state data, the neurons of the output layer of the model to be trained can be determined based on the adjustment actions, and the corresponding hidden layer structure can be designed based on the relationship between the input layer and the output layer to construct the model to be trained.

[0064] For example, the state data input to the model includes welding voltage, welding current and energy consumption, and the adjustment actions output by the model include adjusting welding current, adjusting welding speed, adjusting wire feed speed, adjusting welding head position and adjusting welding angle. Therefore, the model to be trained can be designed to include an input layer with 3 neurons, at least one hidden layer with the number of neurons in the hidden layer set to twice the number of neurons in the input layer, and an output layer with 5 neurons.

[0065] Step S42: Obtain training datasets for different welding tasks. The training datasets include the first training state.

[0066] After constructing the network architecture of the model to be trained, training datasets for different welding tasks are obtained. As analyzed above, different welding tasks exhibit characteristic differences, which can be reflected in the type of welding material (e.g., steel, aluminum, stainless steel), material thickness, expected weld strength, surface quality requirements, etc. These characteristic differences lead to different welding parameters (e.g., welding voltage, current, welding speed, welding temperature) for different welding tasks. Therefore, based on the variation range of welding parameters for different welding tasks and their impact on welding results, multiple different types of welding tasks can be defined, and corresponding training datasets can be collected for each welding task. These training datasets can be obtained, but are not limited to, experimental data from laboratories, actual data from production lines, or simulation data from simulated environments.

[0067] In a possible implementation, based on the results of the above analysis, a clear description can be defined for each welding task, including the task objective (e.g., minimizing energy consumption, maximizing welding strength), constraints (e.g., limitations on welding materials, range of welding speeds), and evaluation metrics (e.g., weld quality score, energy efficiency), to collect a corresponding training dataset for each welding task. This approach ensures that each welding task has sufficient diversity and representativeness, facilitating the subsequent learning of common features and differences between different welding tasks by the model to be trained.

[0068] The training data for each welding task can include welding results obtained under a certain training state based on set welding parameters. These results include, but are not limited to, welding energy consumption, welding temperature distribution, and weld quality. The first training state can be understood as the state data when welding a preset material workpiece with corresponding welding parameters under a certain welding task. The data type of the first training state is similar to that of the first state data described above and will not be repeated here.

[0069] Furthermore, after collecting the training dataset through at least one of the above methods, the quality of the training data can be improved by preprocessing the data. Preprocessing can include removing outliers and duplicates, data normalization, using a first-order lag filter to remove noise, and data augmentation. For example, using a first-order lag filter to remove noise from the data can be achieved by... Filter coefficients Compared with the previous filtering result The new filtering result is obtained through the following formula. : (8) Filter coefficients The value range is generally between 0 and 1, and / or, based on the formula Convert the data in the training dataset into a standard format. It is the raw collected data. It is the mean. It is the standard deviation. It is standardized data.

[0070] Step S43: Input the first training state of each welding task into the model to be trained to obtain the predicted value output by the model to be trained in the first training state.

[0071] The first training state of each welding task is input into the model to be trained to obtain the predicted value output by the model to be trained in the first training state. The predicted value may include multiple adjustment actions of the welding system to adjust the welding parameters as predicted by the model to be trained in the first training state, as well as the training prediction value corresponding to each adjustment action. The prediction value data is used to represent the expected total return that the welding system can obtain from the current state to the future state after taking a certain adjustment action and following a certain strategy in the first training state.

[0072] Step S44: Calculate the second loss function of the model to be trained in the first training state based on the predicted value, so as to update the parameters of the model to be trained based on each second loss function.

[0073] Based on the predicted values, a second loss function can be calculated for the model under the first training state, and the parameters of the model can be updated based on each second loss function. In this way, the training dataset for each welding task is input into the model for training, enabling the model to perform gradient updates or policy adjustments under each welding task. Furthermore, the model can learn the differences and commonalities between different welding tasks, allowing it to quickly predict new welding tasks using experience from other tasks. This allows for rapid updates to the model with limited data or iterations, improving training speed and effectiveness.

[0074] Optionally, in this embodiment, step S44 further includes: selecting and executing a second adjustment action of the welding system based on the predicted value, so as to obtain a first training reward and a second training state of the adjusted welding system after executing the second adjustment action; calculating the training prediction value and training target value of the model to be trained based on the first training state, the second training state and the first training reward; calculating a second loss function based on the training prediction value and the training target value, so as to update the parameters of the model to be trained based on each second loss function.

[0075] The second adjustment action of the welding system selected based on the predicted value can be randomly selected from multiple adjustment actions output by the predicted value, or selected from multiple adjustment actions by setting a certain strategy or algorithm, without specific limitations. Further, the second training state described above can be obtained by monitoring equipment set on the welding system environment; the first training reward of the welding system can be obtained by the calculation steps or formula (7) of the first reward data in the above embodiment; the step of obtaining the training prediction value can refer to the prediction value data in the above embodiment; the step of obtaining the training target value can also refer to the target value data or formula (2) in the above embodiment; the calculation method of the second loss function can refer to the first loss function or formula (1) in the above embodiment; it will not be repeated here.

[0076] In the above manner, the welding control method of this embodiment can calculate the second loss function of the training dataset under each welding task, and update the parameters of the model to be trained based on each second loss function. This allows the model to learn the characteristic differences of multiple welding tasks, and enables the model to make rapid predictions using the experience of other welding tasks when facing new welding tasks. This allows for rapid updates of the model to be trained with a small amount of data or a small number of iterations, thereby improving the training speed and training effect of the model to be trained.

[0077] Optionally, after step S44, the welding control method of this embodiment further includes: calculating the evaluation index of the model to be trained; in response to the evaluation index meeting the second preset condition, obtaining the test dataset of the model to be trained; inputting the test dataset into the model to be trained to evaluate and verify the model to be trained after multiple training iterations; and outputting the verified model to be trained as an enhanced model.

[0078] Specifically, the welding control method iteratively trains the training model under different welding tasks using the aforementioned method, enabling the model to gradually learn how to accurately select optimal adjustment actions for the welding system. During iterative training, evaluation metrics for the training model are calculated, including but not limited to accuracy, precision, recall, F1 score, ROC curve, mean precision, and log loss. When the evaluation metrics meet a second preset condition, it indicates that the performance of the training model on the training dataset has reached a preset standard. At this point, the training model can be evaluated and validated using a test dataset. The validated model can then be used as a reinforcement model for energy consumption monitoring and optimization of the welding system, ensuring the training effect of the training model. Furthermore, the reinforcement model trained in this way has good generalization ability and adaptability, and can be applied to the optimization of welding parameters under different workpiece materials and welding environments, thereby improving the welding effect of the welding system and reducing welding energy consumption.

[0079] Furthermore, after the training of the model to be trained is completed, it can be applied to a welding system for further model adjustment and optimization. For example, monitoring equipment can be set up to collect welding data in real time during the welding process, and the preprocessed real-time data can be input into the model to be trained. This allows the model to make predictions based on the input real-time data and output adjustment suggestions for the welding system in its current state. During the optimization process, relevant data from each prediction process of the model to be trained can be stored in a sample dataset. This allows the sample data in the sample dataset to serve as experience to assist in updating the model. For example, as in the above embodiment, the gradient of the sample dataset over a certain time period can be calculated to update the model to be trained based on the gradient. This approach allows the trained model to be further adjusted and optimized in a real welding environment, thereby improving the model's prediction accuracy.

[0080] The decision to update or adjust the model parameters of the training model can be made through automated, semi-automated, or manual decision-making methods. Automated decision-making can determine whether the parameters of the training model need to be adjusted by setting thresholds or rule sets; semi-automated decision-making can adjust the parameters of the training model by outputting adjustment suggestions and adjusting them after the user confirms that the adjustments have been made according to the suggestions; manual decision-making can visualize the prediction process of the training model in the above optimization process so that the user can decide whether to adjust the parameters of the training model.

[0081] Unlike existing technologies, the welding control method of this application's embodiment inputs the first state data during the welding process into the strengthening model in real time for prediction. This enables the strengthening model to output adjustment suggestions for welding parameters in real time based on different welding environments. The welding system can adjust the welding parameters based on the first adjustment action and reduce energy consumption during the welding process, thereby improving the intelligence level and efficiency of the welding process. Furthermore, this welding control method can acquire the second state data fed back by the environment after the execution of the first adjustment action in real time, and update the model parameters of the strengthening model in real time based on the second state data. This allows the strengthening model to continuously learn and adapt to new welding environments and workpiece characteristics, maintaining the continuity and accuracy of the optimization effect.

[0082] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 of this embodiment includes a memory 52 and a processor 51, with the processor 51 connected to the memory 52. ​​The memory 52 stores program instructions for implementing the welding control method described in any of the above embodiments. The processor 51 executes the program instructions stored in the memory 52.

[0083] The processor 51 can also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip with signaling processing capabilities. The processor 51 can also be a general-purpose processor, a digital signaling processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0084] The memory 52 can be a memory module, TF card, etc., and can store all information in the electronic device 50, including the input raw data, computer program, intermediate running results, and final running results. It stores and retrieves information according to the location specified by the controller. With the memory, the string matching prediction device has a memory function and can ensure normal operation. The memory of the string matching prediction device can be classified according to its purpose into main memory (RAM) and auxiliary memory (external storage), or it can be classified into external memory and internal memory. External storage is usually magnetic media or optical discs, which can store information for a long time. RAM refers to the storage components on the motherboard, used to store currently executing data and programs, but it is only used for temporary storage of programs and data; the data will be lost when the power is turned off or interrupted.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the device implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0087] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0088] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a system server, or a network device, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of this application.

[0089] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium provided in this application. Figure 6 As shown, the computer-readable storage medium of this application stores program instructions 61 capable of implementing all the above methods. These program instructions 61 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of each embodiment of this application. The aforementioned storage devices include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or electronic devices such as computers, servers, mobile phones, and tablets.

[0090] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A welding control method, characterized in that: Applied to a welding system, the welding control method comprises: Collecting welding data of the welding system in real time during the welding process to obtain current first state data; Inputting the first state data into an enhanced model to obtain prediction data output by the enhanced model; Based on the prediction data, the welding system under the first state data is controlled to perform a first adjustment action to optimize energy consumption of the adjusted welding system.

2. The welding control method according to claim 1, characterized in that: After the step of controlling the welding system under the first state data to perform a first adjustment action based on the prediction data so that the adjusted welding system continues to weld, the welding control method further includes: Collecting welding data when the adjusted welding system is welding to obtain second state data; Based on the second state data, calculating first reward data of the welding system under the first state data; The first state data, the first adjustment action, the first reward data, and the second state data are stored as a sample data set in a sample data set.

3. The welding control method according to claim 2, characterized in that: The prediction data includes expected state data predicted by the welding system when performing the first adjustment action; after the step of collecting welding data when the adjusted welding system performs welding to obtain second state data, the welding control method further includes: When the difference between the second state data and the expected state data is greater than a first set threshold, the reinforcement model is updated based on the first reward data and / or the second state data.

4. The welding control method according to claim 2, characterized in that: After the step of storing the first state data, the first adjustment action, the first reward data and the second state data as a sample data in a sample data set, the welding control method includes: When the sample data set satisfies a first preset condition, calculating a first loss function of all the sample data in the sample data set; The gradient of the sample data set is calculated based on the first loss function of all the sample data, so as to update the reinforcement model based on the gradient.

5. The welding control method according to claim 2, characterized in that: The step of calculating the first reward data of the welding system under the first state data based on the second state data comprises: Acquire a deviation value between a weld after the welding system performs the first adjustment action under the first state data and an ideal weld, so as to calculate welding quality data of the welding system based on the deviation value; acquiring a welding speed of the welding system after the first adjustment action is performed under the first state data, so as to calculate welding efficiency data of the welding system based on the welding speed; Acquire a power value consumed by the welding system when performing the first adjustment action under the first state data, and calculate energy consumption data of the welding system based on the power value; The welding quality data, the welding efficiency data, and the energy consumption data are weightedly summed to obtain the first reward data.

6. The welding control method according to claim 1, characterized in that: Before the step of inputting the first state data into the strengthening model to obtain the prediction data output by the strengthening model, the welding control method further includes: Based on the characteristic differences of different welding tasks, the model to be trained is constructed; Acquire a training data set under different welding tasks, wherein the training data set includes a first training state; Inputting the first training state of each welding task into the model to be trained to obtain a predicted value output by the model to be trained under the first training state; A second loss function of the model to be trained in the first training state is calculated based on the predicted value, so as to update the parameters of the model to be trained based on each of the second loss functions.

7. The welding control method according to claim 6, characterized in that: The step of calculating the second loss function of the model to be trained in the first training state based on the predicted value, so as to update the parameters of the model to be trained based on each of the second loss functions, includes: Selecting and executing a second adjustment action of the welding system based on the predicted value to obtain a first training reward and a second training state of the adjusted welding system after executing the second adjustment action; Calculate the training prediction value and the training target value of the model to be trained based on the first training state, the second training state, and the first training reward; The second loss function is calculated based on the training prediction value and the training target value, so as to update the parameters of the model to be trained based on each of the second loss functions.

8. The welding control method according to claim 6, characterized in that: After the step of calculating the second loss function of the model to be trained in the first training state based on the predicted value, and updating the parameters of the model to be trained based on each of the second loss functions, the welding control method further includes: Calculating an evaluation index of the model to be trained, and in response to the evaluation index satisfying a second preset condition, obtaining a test data set of the model to be trained; Inputting the test data set into the model to be trained to evaluate and verify the model to be trained after multiple training iterations; The verified model to be trained is output as the enhanced model.

9. An electronic device, characterized in that: The method comprises a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is used to execute the program instructions stored in the memory to implement the welding control method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and the program instructions can be executed by a processor to implement the welding control method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Intelligent welding method and system for inertia friction welding machine

    CN116275462A

  • Intelligent laser mirror image welding device and method based on active deformation strategy

    CN117862670A

  • Control optimization method and system for intelligent manufacturing and processing process

    CN118192447A

  • Welding method based on artificial intelligence and welding robot

    CN118237825A

Cited By

  • Battery cell welding method and device, electronic equipment, storage medium and program product

    CN119897571A