Welding control method, electronic device and computer readable storage medium

By collecting welding data in real time and inputting it to the reinforcement model for prediction and adjusting welding parameters, the problem of low timeliness of energy consumption monitoring and optimization of welding process is solved, real-time monitoring and optimization of energy consumption of welding process is achieved, and the energy consumption of welding process is optimized to adapt to complex environments.

CN118550202BActive Publication Date: 2024-11-08中科先进(深圳)集成技术有限公司
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When the energy consumption monitoring and optimization of existing welding processes, the timeliness is low, and the welding process cannot be adjusted in time, resulting in poor energy consumption monitoring effect.

Method used

By collecting welding data in real time, inputting it to the reinforcement model for prediction, adjusting welding parameters based on the prediction data, optimizing energy consumption in real time, and constantly updating the reinforcement model through the sample data set to adapt to complex environments.

Benefits of technology

It improves the timeliness and optimization effect of energy consumption monitoring of welding process, can monitor and adjust welding processes in real time, and adapt to the variable welding environment and workpiece characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550202B_ABST
    Figure CN118550202B_ABST
Patent Text Reader

Abstract

The present application discloses a welding control method, an electronic device, and a computer-readable storage medium. The welding control method acquires the current first state data by real-time collection of welding data of the welding system during the welding process; inputs the first state data into the strengthening model to obtain the predicted data output by the strengthening model; 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. In the above manner, the welding control method of the present application can obtain the first adjustment action of the welding system for energy consumption optimization based on the prediction of the first state data through the strengthening model, so that the welding system continues to weld after executing the first adjustment action, so as to realize the real-time monitoring and optimization adjustment of the welding process energy consumption of the welding system, and improve the optimization effect and timeliness of energy consumption monitoring optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a welding control method, an electronic device and a computer-readable storage medium. Background Art

[0002] With the rapid development of automation technology, the application of welding process is becoming more and more extensive. However, in the welding process, it is usually necessary to focus on the energy consumption of the welding process. Excessive energy consumption not only increases production costs, but also may have a negative impact on the environment. Therefore, how to monitor and optimize the energy consumption of the welding process is of great significance and has broad application prospects.

[0003] At present, the existing technology usually monitors energy consumption by recording energy consumption data during the welding process when performing energy consumption monitoring and optimization. The amount of energy consumption data is large, and users need to analyze a large amount of energy consumption data to obtain simple optimization strategies, such as fixed parameter adjustment or experience-based optimization methods. The welding process of the welding process is often unable to be adjusted in time, resulting in poor adjustment effects and low timeliness of energy consumption monitoring and optimization. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a welding control method, an electronic device and a computer-readable storage medium.

[0005] To solve the above problems, the present application provides a first technical solution: a welding control method is provided, which is applied to a welding system. The above welding control method includes: real-time collection of welding data of the above welding system during the welding process to obtain current first state data; inputting the above first state data into an enhancement model to obtain prediction data output by the above enhancement model; based on the above prediction data, controlling the above welding system under the above first state data to perform a first adjustment action to optimize the energy consumption of the adjusted above 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 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 performs welding 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 data set.

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

[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 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; and calculating a gradient of the sample data set based on the first loss function of all the sample data to update the strengthening model based on the gradient.

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

[0010] Optionally, before the step of inputting the above-mentioned first state data into the enhancement model to obtain the predicted data output by the above-mentioned enhancement model, the above-mentioned welding control method also includes: constructing a model to be trained based on the characteristic differences of different welding tasks; obtaining a training data set under different above-mentioned welding tasks, the above-mentioned training data set includes a first training state; inputting the above-mentioned first training state of each of the above-mentioned welding tasks into the model to be trained to obtain the predicted value output by the above-mentioned model to be trained in the above-mentioned first training state; calculating the second loss function of the above-mentioned model to be trained in the above-mentioned first training state based on the above-mentioned predicted value, so as to update the parameters of the above-mentioned model to be trained based on each of the above-mentioned second loss functions.

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

[0012] Optionally, 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 the second loss function, the welding control method further includes: calculating the evaluation index of the model to be trained, and in response to the evaluation index satisfying the 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; and outputting the verified model to be trained as the enhanced model.

[0013] To solve the above problems, the present application provides a second technical solution: an electronic device is provided, comprising 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 above welding control method.

[0014] In order to solve the above problem, the present application provides a third technical solution: providing a computer-readable storage medium, the computer-readable storage medium storing program instructions, and the program instructions can be executed by a processor to implement the above welding control method.

[0015] Different from the prior art, the welding control method of the present application acquires the current first state data by real-time collection of welding data of the welding system during the welding process; inputs the first state data into the strengthening model to acquire the prediction data output by the strengthening model; based on the prediction data, controls the welding system under the first state data to perform the first adjustment action to optimize the energy consumption of the adjusted welding system. In the above manner, the welding control method of the present application can obtain the first adjustment action of the welding system for energy consumption optimization based on the prediction of the first state data through the strengthening model, so that the welding system continues to weld after executing the first adjustment action, so as to realize the real-time monitoring and optimization adjustment of the welding process energy consumption by the welding system, and improve the optimization effect and timeliness of energy consumption monitoring optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0017] Figure 1 is a flow chart of a first embodiment of a welding control method provided by the present application;

[0018] Figure 2 is a flow chart of a second embodiment of the welding control method provided by the present application;

[0019] Figure 3 is a flow chart of a third embodiment of the welding control method provided by the present application;

[0020] Figure 4 is a flow chart of a fourth embodiment of a welding control method provided by the present application;

[0021] Figure 5 is a structural schematic diagram of an embodiment of an electronic device provided by the present application;

[0022] Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0025] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0026] Specifically, when performing energy consumption monitoring and optimization, the existing technology often provides simple optimization strategies through the energy consumption data recorded by the energy consumption sensor, such as fixed parameter adjustment or experience-based optimization methods, and the optimization strategy is single. Since the welding process can be applied to a variety of welding scenarios, the existing technology often cannot adapt to the complex and changeable welding environment and workpiece characteristics, resulting in poor adjustment effect and poor energy consumption optimization effect.

[0027] In view of this, the embodiment of the present application constructs an enhanced model for energy consumption optimization prediction through reinforcement learning technology and artificial intelligence technology, and assists in welding control through the enhanced model to achieve optimal adjustment of the energy consumption of the welding process under the status data of the real-time welding environment.

[0028] See also Figure 1 , Figure 1 1 is a flow chart of the first embodiment of the welding control method provided by the present application. Figure 1 As shown, the embodiment of the present application proposes a welding control method, which is applied to a welding system. The welding control method includes the following steps:

[0029] Step S11: collecting welding data of the welding system in real time during the welding process to obtain current first state data.

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

[0031] The embodiment of the present application acquires the first state data of the welding system in the current environmental state by real-time collection of welding data of the welding system during the welding process, wherein the types of welding data include but are not limited to at least one type of state parameters 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, energy consumption meters, etc. can be set on the welding head, mechanical arm or welding robot of the welding system to obtain the current first state data through the above monitoring devices. Step S12: Input the first state data into the enhanced model to obtain the predicted data output by the enhanced model.

[0032] After obtaining the first state data, the first state data collected in real time is continuously input into the reinforcement model to obtain the prediction data corresponding to the first state data output by the reinforcement model. The prediction data is the relevant adjustment suggestions for adjusting and optimizing the welding parameters of the welding system under the first state data to reduce energy consumption. Among them, the reinforcement model can be constructed by reinforcement learning technology and artificial intelligence technology. The constructed reinforcement model is further constructed by MAML (Model-Agnostic Meta-Learning) or RL 2 Meta-learning algorithms such as Reinforcement Learning Squared are trained and evaluated to optimize the energy consumption of welding parameters in welding systems.

[0033] Furthermore, the reinforcement model can also generate corresponding prediction data based on the task requirements of the current welding task of the welding system, the material properties of the workpiece to be welded, and the first state data. The task requirements and material properties of the welding task can be obtained through the relevant setting parameters of the original welding table; when there are order requirements and / or production requirements change, the above task requirements and material properties can also be input into the reinforcement model for adjustment, which is not specifically limited here.

[0034] Step S13: Based on the prediction 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.

[0035] Specifically, the prediction data may include adjustment actions of multiple welding parameters and prediction value data corresponding to each adjustment action, and the adjustment actions include but are not limited to adjusting welding current, adjusting welding speed, adjusting wire feeding speed, adjusting welding head position and adjusting welding angle. The prediction value data is used to represent the expected total return that can be obtained 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., the first state data). Based on the multiple adjustment actions in the prediction data and the corresponding prediction value data, the first adjustment action suitable for energy consumption optimization of the welding system can be selected from the prediction data, and the welding system under the first state data can be controlled to perform the first adjustment action to optimize the energy consumption of the adjusted welding system, and the optimized welding system can continue to weld. In the above manner, the first state data collected in real time during the welding process can be continuously input into the enhancement model to control the welding system to perform the first adjustment action according to the prediction data output by the enhancement model, so as to minimize the energy consumption of the welding system and improve the effect of energy consumption optimization.

[0036] Furthermore, after the welding system after adjustment is controlled based on the adjustment suggestion of the strengthening model to continue welding, the welding result of the adjusted welding system can be output to the user end through a visual interface or chart, so that the user can monitor the welding optimization process, so that the user can make subsequent process adjustments based on the welding results. For example, if the user finds that the welding quality after optimization 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 efficiency can be improved by increasing the welding speed or reducing unnecessary downtime. In addition, the welding results can also be stored in the relevant sample database to facilitate subsequent data analysis and model improvement.

[0037] In the implementation of this application, the welding control method acquires the current first state data by real-time collection of welding data of the welding system during the welding process; inputs the first state data into the strengthening model to obtain the predicted data output by the strengthening model; based on the predicted data, controls the welding system under the first state data to perform the first adjustment action to optimize the energy consumption of the adjusted welding system. In the above manner, the welding control method of this embodiment can obtain the first adjustment action of the welding system for energy consumption optimization based on the prediction of the first state data through the strengthening model, so that the welding system continues to weld after executing the first adjustment action, so as to realize the real-time monitoring and optimization adjustment of the welding process energy consumption of the welding system, and improve the optimization effect and timeliness of energy consumption monitoring optimization.

[0038] In one embodiment, see Figure 2 , Figure 2 1 is a flow chart of the second embodiment of the welding control method provided by the present application. Figure 2As shown, after step S13, the welding control method of this embodiment further includes:

[0039] Step S21: collecting welding data when the adjusted welding system is welding to obtain second state data.

[0040] Specifically, during the welding process of the welding system, the welding data during welding is continuously collected by the monitoring device, and the second state data is continued to be collected after the welding system performs the first adjustment action to obtain the second state data. In a possible implementation, the first state data includes the first energy consumption data, the second state data includes the second energy consumption data, and 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, the first reward data of the welding system under the first state data is calculated.

[0041] Specifically, the first reward data is an instant reward obtained by the welding system after performing the first adjustment action under the first state data, and 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.

[0042] Step S23: 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.

[0043] After the first reward data is calculated, the first state data, the first adjustment action, the first reward data and the second state data are stored in the sample data set as a sample data. It can be understood that the above sample data can be stored in the sample data set when each training and energy consumption optimization prediction of the reinforcement model is completed, so that each sample data in the sample data set can be understood as an experience of the reinforcement model. The reinforcement model is used to predict welding parameters and adjustment measurements suitable for the current welding environment or current task characteristics based on the experience of different welding tasks in the sample database when facing different welding tasks, so that the prediction data of the reinforcement model can adapt to complex and changeable welding environments and workpiece characteristics.

[0044] Furthermore, data analysis can be performed from the experience in the sample database to extract relevant information and rules for the subsequent process of welding data analysis and improvement of the reinforcement model. For example, the optimal combination of welding parameters under different welding tasks can be determined by analyzing the influence of different state data (such as welding speed, welding current, welding voltage, etc.) on welding quality, welding efficiency and energy consumption; the abnormal experience in the welding process can also be analyzed, such as analyzing abnormal data with large data deviation under the same welding task, to judge possible fault conditions based on abnormal data and provide corresponding solutions; the influence of different welding parameters and welding processes on energy consumption can also be evaluated through experience to optimize energy efficiency; or, the correlation between different variables (such as welding parameters, type of workpiece material, ambient temperature, etc.) can be studied to obtain the influencing factors of energy consumption or other welding results.

[0045] In an embodiment of the present 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 data set, so that the sample data in the sample data set can be used as a basis for subsequent enhanced models to perform data analysis, optimization prediction, etc., so that the enhanced model can continuously learn and adapt to new welding environments and workpiece characteristics, improve the prediction accuracy of the enhanced model, and thereby improve the optimization effect and timeliness of energy consumption monitoring optimization.

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

[0047] 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, and 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 the 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, and the large deviation may be caused by changes in the material properties of the workpiece to be welded, unstable equipment state of the welding system, and large changes in 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.

[0048] Among them, the reinforcement 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 the loss function based on the second state data and the first reward data, and updating the model parameters of the reinforcement model based on the loss function; or, re-matching the characteristics of the welding task based on the second state data, so that the reinforcement model can re-predict the energy consumption optimization based on the characteristics of the second state data; or, based on at least one of the first reward data and the second state data, updating the optimization algorithm used by the reinforcement model so that the updated reinforcement model can be applicable to the current welding environment; or, judging whether an equipment abnormality occurs in the welding system based on at least one of the first reward data and the second state data, so as to generate a warning message when it is determined that an equipment abnormality occurs in the welding system.

[0049] In an embodiment of the present application, 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 the first set threshold value, so that the reinforcement model can be adjusted in real time when a prediction deviation occurs during the welding process of the welding system, so that the welding system of this embodiment can adapt to complex and changeable welding environments and workpiece characteristics, and improve the optimization effect and timeliness of energy consumption monitoring optimization.

[0050] Optionally, in one embodiment, after step S23, the welding control method includes: when the sample data set meets the first preset condition, calculating the first loss function of all sample data in the sample data set; calculating the gradient of the sample data set based on the first loss function of all sample data, so as to update the strengthening model based on the gradient.

[0051] Specifically, the sample data set satisfies the first preset condition, which may include: the number of the sample data set is greater than the second set threshold, that is, the collection amount of the sample data set reaches a certain order of magnitude, and the reinforcement model can be updated based on the gradient calculated by the sample data set; or, data analysis is performed on all sample data in the sample data set to obtain the difference value between the second state data and the expected state data in each sample data, and the degree of dispersion analysis is performed on the difference value of all sample data, for example, the degree of dispersion analysis can be performed by calculating the standard deviation, dispersion coefficient and other parameters of the difference value between the second state data and the expected state data in all sample data. When the calculation result of the degree of dispersion analysis is greater than the third set threshold, it is determined that the sample data set satisfies the first preset condition, and the reinforcement model is updated in the above manner.

[0052] After determining that the sample data set meets the first preset condition, the first loss function of all sample data in the sample data set is calculated. For each sample data in the sample data set, it can be calculated in the following way: according to 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 data set is calculated based on the predicted value data and the target value data in each sample data. The calculation process is shown in formula (1):

[0053] ; (1)

[0054] Among them, L( ) is the first loss function; N is the number of sample data in the sample data set; It is the predicted value data obtained by the reinforcement network based on the i-th sample data among N sample data. is the first status data of the welding system, This is the first adjustment action of the welding system. are the parameters of the reinforcement model; It is the target value data, usually calculated using the Bellman equation.

[0055] The target value data of the i-th sample data can be calculated. Based on the second state data of the sample data, the reinforcement model can be used to determine the future rewards that can be obtained by executing all possible adjustment actions under the future second state data, and based on the sum of the first reward data of the sample data and the future rewards, the target value data of the welding system can be calculated. The calculation process of the target value data is shown in formula (2):

[0056] ; (2)

[0057] in, The first adjustment action is performed After the first state data The first reward data obtained under; is a discount factor that weighs the importance of future rewards, is to use the reinforcement model under the second state data For all possible adjustments Predicted future rewards.

[0058] After obtaining the first loss function of the sample data set, calculate the first loss function with respect to the model parameters The partial derivative vector of Formula (3) shows that:

[0059] ; (3)

[0060] in, is a parameter Dimension.

[0061] After calculating the gradient of the sample data set, set a learning rate , to control the step size of parameter update; strengthen the model parameters of the model Update according to the following rules: .

[0062] Through the above method, the model parameters of the enhanced model can be updated online when the sample data set meets the first preset condition (for example, the accumulation of data volume reaches a certain level, the performance degradation exceeds a certain threshold, etc.), and the model parameters are updated immediately when the sample data of the sample data set arrives to adapt to changes in the welding environment, so that the enhanced model can continuously learn and adapt to new welding environments and workpiece characteristics, improve the prediction accuracy of the enhanced model, and thereby improve the optimization effect and timeliness of energy consumption monitoring optimization.

[0063] Optionally, in other embodiments, whether to update the model parameters can also be determined in the following manner: obtaining performance data of the welding system after welding under adjusted welding parameters, and in response to the performance data being less than a first set threshold, executing the step of updating the enhancement model; or, in response to the difference in environmental data of the welding system under first state data and second state data being greater than a second set threshold, executing the step of updating the enhancement model; or, it can include sample data sets collected in multiple time periods, and after the newly collected sample data set meets a first preset condition, obtaining the difference in data distribution of the newly collected sample data set and the data distribution of the previous sample data set, and if the difference is significant, executing the step of updating the enhancement model.

[0064] Among them, the above-mentioned performance data are performance indicators of the welding system during the welding process, such as the accuracy of welding quality, the stability of welding speed, etc.; the above-mentioned environmental data may include welding temperature, welding humidity, material type of the workpiece to be welded and other related factors of the welding environment; the difference in data distribution of the above-mentioned sample data set can be obtained through statistical test (such as Kolmogorov-Smirnov test, Anderson-Darling test, etc.) analysis method, which is not specifically limited here.

[0065] Furthermore, after the model parameters of the strengthening model are updated in the above manner, the test data set needs to be input into the updated strengthening model to evaluate and verify the strengthening model to ensure that the performance of the strengthening model is improved and meets the actual welding environment.

[0066] Optionally, the first reward function is an immediate reward after the welding system performs the first adjustment action under the first state data. Figure 3 , Figure 3 FIG. 1 is a flow chart of the third embodiment of the welding control method provided by the present application. Figure 3 As shown, in the welding control method of this embodiment, step S22 further includes:

[0067] Step S31: obtaining a deviation value between a weld after the welding system performs a first adjustment action under first state data and an ideal weld, so as to calculate welding quality data of the welding system based on the deviation value.

[0068] Specifically, when the welding system obtains a welding task and welds the workpiece to be welded, it will generate 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 formula (4):

[0069] ; (4)

[0070] in, Is the current first state data Perform the first adjustment action The width deviation between the final weld and the ideal weld; is a positive number used to adjust the influence of the deviation value on the welding quality. The welding quality of the welding system is mapped to the interval (0, 1] by formula (4), and the closer the value of the welding quality data is to 1, the better the welding quality is.

[0071] Step S32: obtaining the welding speed of the welding system after the first adjustment action is performed under the first state data, so as to calculate the welding efficiency data of the welding system based on the welding speed.

[0072] Specifically, the welding speed of the welding system can be obtained by calculating the length of the weld completed per unit time. The welding efficiency data of the welding system is calculated based on the welding speed. The specific calculation formula is shown in formula (5):

[0073] ; (5)

[0074] in, Is the current first state data Perform the first adjustment action After welding speed, is the maximum welding speed of the welding system. This expression maps the welding efficiency to the interval [0, 1]. The closer the welding efficiency data is to 1, the higher the efficiency is.

[0075] Step S33: 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.

[0076] Specifically, the energy consumption of the welding system can be defined by the electric energy consumption, and the power value consumed by the welding system when performing the first adjustment action under the first state data is obtained by a monitoring device such as a power sensor, and the energy consumption data of the welding system is calculated based on the power value. The specific calculation formula is shown in formula (6):

[0077] ; (6)

[0078] in, Is the current first state data Perform the first adjustment action The power consumption is It is the duration of executing the first adjustment action. The lower the energy consumption data is, the lower the energy consumption of the welding system is.

[0079] Step S34: performing weighted summation on the welding quality data, welding efficiency data and energy consumption data to obtain first reward data.

[0080] After obtaining the welding quality data, welding efficiency data and energy consumption data, the welding quality data, welding efficiency data and energy consumption data are weighted and summed to obtain the first reward data. The calculation formula of the first reward data is shown in formula (7):

[0081] ; (7)

[0082] in, , and They are weight parameters for welding quality data, welding efficiency data and energy consumption data respectively. The weight parameters of each of the welding quality data, welding efficiency data and energy consumption data can be determined by the actual needs of the welding system. For example, when the welding system has a greater demand for improving welding quality, the weight parameters of each of the welding quality data, welding efficiency data and energy consumption data can be set to 4, 3, 3 respectively, or can be set to other weight forms, which are not specifically limited here.

[0083] It can be understood that in this embodiment, the instant reward obtained after the welding system performs the first adjustment action can be related to the result data such as the welding quality, efficiency, and energy consumption 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 performing the first adjustment action, so that when the enhanced model optimizes and predicts the welding process of the welding system, it can ensure that the welding quality, welding efficiency, and energy consumption of the welding system are in a balanced state, so as to avoid problems such as poor welding quality and low efficiency caused by excessively low energy consumption, and improve the optimization effect of the welding system. Under other application scenarios and task objectives, the reward data can also introduce other data to design. For example, when the enhanced 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, which is not specifically limited here.

[0084] In one embodiment, see Figure 4 , Figure 4 FIG. 4 is a flow chart of the fourth embodiment of the welding control method provided by the present application. Figure 4 As shown, before step S12, the welding control method of this embodiment further includes:

[0085] Step S41: construct a model to be trained based on the characteristic differences of different welding tasks.

[0086] Specifically, for different types of welding tasks, at least one of the welding environment, workpiece material, welding parameters, and expected welding results of the welding system may be different. In order to enable the enhanced model to have better prediction performance when facing different types of welding tasks, when constructing the enhanced model, this embodiment needs to define the task based on the characteristic differences of different welding tasks to determine the model framework of the model to be trained.

[0087] Among them, for different welding tasks, the state data of the task can roughly include at least one of welding voltage, welding current, energy consumption, welding speed, welding temperature, etc. The welding action that needs to be adjusted according to the state may include adjusting the welding current, adjusting the welding speed, adjusting the wire feeding speed, adjusting the welding head position and adjusting the welding angle, etc. At least one, 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 action, 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.

[0088] Exemplarily, the state data of the model input include welding voltage, welding current and energy consumption, and the adjustment actions of the model output include adjusting welding current, adjusting welding speed, adjusting wire feeding 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.

[0089] Step S42: Acquire a training data set under different welding tasks, where the training data set includes a first training state.

[0090] After constructing the network architecture of the model to be trained, the training data sets under different welding tasks are obtained. Among them, it can be seen from the above analysis that there are characteristic differences between different welding tasks, which can be reflected in the type of welding materials (such as steel, aluminum, stainless steel, etc.), the thickness of the material, the expected welding strength, surface quality requirements, etc. Based on the characteristic differences, the welding parameters (such as welding voltage, current, welding speed, welding temperature, etc.) determined by different welding tasks are different. Therefore, based on the variation range of welding parameters of different welding tasks and their influence on welding results, multiple different types of welding tasks can be defined, and corresponding training data sets can be collected under each welding task. The training data set can be obtained, but not limited to, through laboratory experimental data, actual data of production lines, or simulation data of simulated environments.

[0091] 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 objectives (such as minimizing energy consumption, maximizing welding strength, etc.), constraints (such as welding material limitations, welding speed range, etc.), and evaluation indicators (such as weld quality score, energy efficiency, etc.), so as to collect corresponding training data sets under each welding task. In this way, each welding task has sufficient differences and representativeness, so that the subsequent training model can learn the common features and differences between different tasks from different welding tasks.

[0092] The training data of the training data set of each welding task may include welding results obtained by welding according to set welding parameters under a certain training state, and the welding results include but are not limited to welding energy consumption, welding temperature distribution, weld quality, etc. The above is the first training state, which can be understood as the state data when welding corresponding welding parameters to a preset material workpiece under a certain welding task. The data type of the first training state is similar to the above first state data, which will not be repeated here.

[0093] Furthermore, after the data of the training data set is collected by at least one of the above methods, the quality of the training data can be improved by preprocessing the data. Among them, the preprocessing can be performed by removing outliers and duplicate values, normalizing the data, using a first-order lag filter algorithm to remove noise in the data, and enhancing the data. Exemplarily, using a first-order lag filter algorithm to remove noise in the data can be performed by inputting the data. , filter coefficient And the last filtering result , the new filtering result is obtained by the following formula :

[0094] ; (8)

[0095] Filter coefficient 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 form. is the original collected data, is the mean, is the standard deviation, is the standardized data.

[0096] Step S43: 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.

[0097] 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 for adjusting welding parameters predicted by the model to be trained in the first training state and the training prediction value corresponding to each adjustment action. The predicted value data is used to represent the expected total return that can be obtained from the current state to the future state after the welding system takes a certain adjustment action and follows a certain strategy in the first training state.

[0098] 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.

[0099] Based on the predicted value, the second loss function of the model to be trained in the first training state can be calculated, so as to update the parameters of the model to be trained based on each second loss function. In the above manner, the training data set of each welding task is input into the model to be trained, so that the model to be trained can perform gradient update or strategy adjustment under the training of each welding task; and the model to be trained can learn the differences and commonalities between different tasks in multiple welding tasks, so that when the model to be trained faces a new welding task, it can use the experience of other welding tasks to make rapid predictions, so as to quickly update the model to be trained through 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.

[0100] Optionally, in this embodiment, step S44 further 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; calculating 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; calculating the second loss function based on the training prediction value and the training target value to update the parameters of the model to be trained based on each second loss function.

[0101] Among them, the second adjustment action of the welding system is selected based on the predicted value, which 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, which is not specifically limited here. Further, the above-mentioned second training state can be obtained by a monitoring device set in the environment of the welding system; the first training reward of the welding system can be obtained by the calculation step of the first reward data or formula (7) of the above embodiment; the step of obtaining the training prediction value can refer to the predicted value data of the above embodiment; the step of obtaining the training target value can also refer to the target value data or formula (2) of the above embodiment; the calculation method of the second loss function can refer to the first loss function or formula (1) of the above embodiment; it will not be repeated here.

[0102] Through the above method, the welding control method of this embodiment can calculate the second loss function of the training data set under each welding task, and update the parameters of the to-be-trained model based on each second loss function, so that the to-be-trained model can learn the characteristic differences of multiple welding tasks, and then when the to-be-trained model faces a new welding task, it can use the experience of other welding tasks to make rapid predictions, so that the to-be-trained model can be quickly updated through a small amount of data or a small number of iterations, thereby improving the training speed and training effect of the to-be-trained model.

[0103] Optionally, after step S44, the welding control method of this embodiment also includes: calculating the evaluation index of the model to be trained, and in response to the evaluation index satisfying the 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; and outputting the verified model to be trained as a reinforced model.

[0104] Specifically, the welding control method iteratively trains the training model under different welding tasks in the above manner, so that the training model gradually learns how to accurately select the optimized adjustment action for the welding system. During the iterative training process, the evaluation index of the training model is calculated, and the evaluation index is not limited to accuracy, precision, recall rate, F1 score, ROC curve, average precision mean and logarithmic loss, etc. When the evaluation index meets the second preset condition, it means that the performance of the training model on the training data set reaches the preset standard. At this time, the training model can be evaluated and verified through the test data set, so that the training model after evaluation and verification can be used as an enhanced model to monitor and optimize the energy consumption of the welding system, and ensure the training effect of the training model. In addition, the enhanced model trained in the above manner 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.

[0105] Furthermore, after the training of the model to be trained is completed, the model to be trained can also be actually applied to the welding system for further model adjustment and optimization. Exemplarily, a monitoring device can be set to collect the welding data of the welding system in real time during the welding process to obtain real-time data, and the pre-processed real-time data can be input into the model to be trained, so that the model to be trained can make predictions based on the input real-time data and output adjustment suggestions for the welding system in the current state. In the above optimization process, the relevant data of each prediction process of the model to be trained can be stored in the sample data set, so that the sample data in the sample data set can be used as experience to assist the model update of the model to be trained. For example, the gradient of the sample data set in a certain time period can be calculated in the above embodiment to update the model to be trained based on the gradient. In the above manner, the trained model to be trained can be further adjusted and optimized in an actual welding environment to improve the prediction accuracy of the model.

[0106] Among them, it is also possible to choose whether to update and adjust the model parameters of the model to be trained by automated decision-making, semi-automated decision-making, manual decision-making, etc. Automated decision-making can determine whether the parameters of the model to be trained need to be adjusted by setting thresholds or rule sets; semi-automated decision-making can adjust the parameters of the model to be trained by outputting adjustment suggestions and adjusting the parameters of the model to be trained after the user confirms that the adjustment is made according to the adjustment suggestions; manual decision-making can visualize the prediction process of the model to be trained in the above optimization process to enable the user to determine whether to adjust the parameters of the model to be trained.

[0107] Different from the prior art, the welding control method of the embodiment of the present application inputs the first state data of the welding process into the enhancement model in real time for prediction, so that the enhancement model can 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; and the welding control method can obtain the second state data of the environmental feedback after executing the first adjustment action in real time, and update the model parameters of the enhancement model in real time based on the second state data, so that the enhancement model can continuously learn and adapt to new welding environments and workpiece characteristics, and maintain the continuity and accuracy of the optimization effect.

[0108] See also Figure 5 , Figure 5 Schematic diagram of the structure of an embodiment of the electronic device provided by the present application. Figure 5 As shown, the electronic device 50 of this embodiment includes a memory 52 and a processor 51, and the processor 51 is connected to the memory 52. ​​The memory 52 is used to store program instructions for implementing the welding control method described in any of the above embodiments. The processor 51 is used to execute the program instructions stored in the memory 52.

[0109] The processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having the ability to process signals. The processor 51 may 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, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0110] The memory 52 can be a memory stick, a TF card, etc., which can store all the information in the electronic device 50, including the input raw data, computer programs, intermediate operation results and final operation results are all stored in the memory. 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 divided into main memory (internal memory) and auxiliary memory (external memory) according to the purpose. There is also a classification method of dividing it into external memory and internal memory. External memory is usually a magnetic medium or an optical disk, etc., which can store information for a long time. Memory refers to the storage component on the motherboard, which is used to store the data and programs currently being executed, but is only used to temporarily store programs and data. If the power is turned off or the power is cut off, the data will be lost.

[0111] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0114] If the integrated unit is implemented in the form of 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 the present application, 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, which is stored in a storage medium and includes several instructions for a computer device (which can 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 various implementation methods of the present application.

[0115] See also Figure 6 , Figure 6 Schematic diagram of the structure of an embodiment of the computer-readable storage medium provided by the present application. Figure 6 As shown, the computer-readable storage medium of the present application stores program instructions 61 that can implement all the above methods, wherein the program instructions 61 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present application. The aforementioned storage device includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or electronic devices such as a computer, a server, a mobile phone, and a tablet.

[0116] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present 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, controlling the welding system under the first state data to perform a first adjustment action, so as to optimize energy consumption of the adjusted welding system; 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; 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; 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; Calculating the gradient of the sample data set based on the first loss function of all the sample data, so as to update the reinforcement model based on the gradient; 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; Calculating a second loss function of the model to be trained in the first training state based on the predicted value, so as to update parameters of the model to be trained based on each of the second loss functions; 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.

2. The welding control method according to claim 1, 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.

3. The welding control method according to claim 1, 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.

4. The welding control method according to claim 1, 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.

5. 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 according to any one of claims 1 to 4.

6. 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 according to any one of claims 1 to 4.

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