Ultrasonic metal welding result detection method and system and medium

The welding parameters and real-time data are obtained through the ultrasonic generator and compared with the trial welding data, which solves the problem of difficult data fluctuations during the welding process, and realizes accurate judgment of the yield rate of welding products and real-time monitoring of the welding process.

CN119688056APending Publication Date: 2025-03-25GUANGDONG HAIMING SOUND TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411829118.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing ultrasonic metal welding result detection methods are difficult to control data fluctuations in the welding process in real time, making it difficult to accurately judge the yield rate of welding products.

Method used

The welding parameters are obtained through the ultrasonic generator, the welding data is obtained in real time, and the trial welding data is compared to determine whether the data deviation is greater than or equal to the set deviation threshold, thereby determining the good or bad products of the welding product.

Benefits of technology

Real-time monitoring of the welding process and accurate data analysis are achieved, and the accuracy of judging the yield rate of welding products is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119688056A_ABST
    Figure CN119688056A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an ultrasonic metal welding result detection method and system and a medium. The method comprises the steps that welding parameters are obtained based on an ultrasonic generator, metal is welded based on the welding parameters, and welding data are obtained in real time; performing trial welding for several times to obtain trial welding data; comparing the real-time welding data with the test welding data to obtain data deviation; judging whether the data deviation is greater than or equal to a set deviation threshold value; if not, judging that the welded product is a defective product; if yes, the welded product is judged to be a good product; metal is welded through the ultrasonic generator, the welding data are obtained, the welding data are tested, the tension data are obtained, the yield of welded products is accurately analyzed according to the analysis result of the tension data, and therefore the welding result is accurately obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of metal welding detection, and in particular to an ultrasonic metal welding result detection method, system and medium. Background Art

[0002] Ultrasonic metal welding is an efficient and environmentally friendly welding method that has been widely used in various fields. The existing ultrasonic metal welding result detection method is to test the welding several times and use the test welding data as the standard. The subsequent welding data is compared with the standard data to determine whether it is within the deviation range from the standard value. The power fluctuation during the welding process is completely different, and the final welding product effect will also be completely different.

[0003] The frequency tracking speed of the ultrasonic generator has reached the μs level. During the 1s welding process, thousands of data will be generated. If the data of the entire welding process is not controlled and only the results are looked at, it will be impossible to fully control defective products. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, system and medium for detecting ultrasonic metal welding results, by welding metal with an ultrasonic generator to obtain welding data, testing the welding data to obtain tensile data, and accurately analyzing the yield rate of the welding product based on the analysis results of the tensile data, thereby accurately obtaining the welding result.

[0005] The present application also provides an ultrasonic metal welding result detection method, comprising: Acquire welding parameters based on an ultrasonic generator, weld metals based on the welding parameters and acquire welding data in real time; Try welding several times to get test welding data; Compare the real-time welding data with the trial welding data to obtain the data deviation; Determine whether the data deviation is greater than or equal to a set deviation threshold; If it is greater than or equal to, the welded product is judged as defective; If it is less than , the welded product is judged to be good.

[0006] Optionally, in the ultrasonic metal welding result detection method described in the embodiment of the present application, obtaining welding parameters based on an ultrasonic generator, welding the metal based on the welding parameters and obtaining welding data in real time specifically includes: Obtain complete frequency, power and amplitude data from the ultrasonic generator during the entire welding process through Modbus RTU communication protocol; By reading the encoder value of the grating ruler in real time, the height data of the entire welding process can be obtained; Set the number of trial welding times, conduct trial welding on the product, and record the frequency, power, amplitude, and height data of each welding. The number of trial welding times is 3-5 times; The frequency, power, amplitude and height data of all welding corresponding to the number of trial welding are saved to obtain welding data.

[0007] Optionally, in the ultrasonic metal welding result detection method described in the embodiment of the present application, the metal is welded based on the welding parameters and the welding data is obtained in real time, and then the following steps are further included: After the trial welding is completed, the trial welding data is fitted to obtain the trial welding fitting data; After that, each welding process sets the frequency, power, amplitude and height data of different welding processes, and obtains the current welding data; Calculate the mean square error of the current welding data and the trial welding fitting data to obtain the calculation result; The calculation results are normalized.

[0008] Optionally, in the ultrasonic metal welding result detection method described in the embodiment of the present application, trial welding is performed several times to obtain trial welding data, specifically including: Construct a test model, input welding data into the test model, and obtain the test prediction results; Compare the test prediction results with the set test results to obtain the prediction difference value; Determining whether the predicted difference value is greater than or equal to a set detection threshold; If it is greater than or equal to, then generate correction information, and optimize the model parameters of the test model based on the correction information; If it is less than, the welding tensile force data is obtained based on the test prediction results.

[0009] Optionally, in the ultrasonic metal welding result detection method described in the embodiment of the present application, a test model is constructed, welding data is input into the test model, and a test prediction result is obtained, which specifically includes: Construct a linear regression model, establish a training set based on historical data, iteratively train the linear regression model, and obtain training results; Determining whether the training result converges; If converged, a test model is generated; If it does not converge, adjust the number of iterations or update the model parameters of the linear regression model.

[0010] Optionally, in the ultrasonic metal welding result detection method described in the embodiment of the present application, welding parameters are obtained based on an ultrasonic generator, metal is welded based on the welding parameters and welding data is obtained in real time, and further includes: Obtain welding parameters, including welding frequency, power and amplitude; Calculate the respective weight values ​​based on welding frequency, power and amplitude; Generate corresponding weight coefficients based on the weight values, and multiply the respective weight coefficients by the corresponding welding frequency, power or amplitude to obtain different welding parameters; Corresponding welding data is obtained based on different welding parameters.

[0011] In a second aspect, an embodiment of the present application provides an ultrasonic metal welding result detection system, the system comprising: a memory and a processor, the memory comprising a program of an ultrasonic metal welding result detection method, and the program of the ultrasonic metal welding result detection method is executed by the processor to implement the following steps: Acquire welding parameters based on an ultrasonic generator, weld metals based on the welding parameters and acquire welding data in real time; Try welding several times to get test welding data; Compare the real-time welding data with the trial welding data to obtain the data deviation; Determine whether the data deviation is greater than or equal to a set deviation threshold; If it is greater than or equal to, the welded product is judged as defective; If it is less than , the welded product is judged to be good.

[0012] Optionally, in the ultrasonic metal welding result detection system described in the embodiment of the present application, obtaining welding parameters based on an ultrasonic generator, welding the metal based on the welding parameters and obtaining welding data in real time specifically includes: Obtain complete frequency, power and amplitude data from the ultrasonic generator during the entire welding process through Modbus RTU communication protocol; By reading the encoder value of the grating ruler in real time, the height data of the entire welding process can be obtained; Set the number of trial welding times, conduct trial welding on the product, and record the frequency, power, amplitude, and height data of each welding. The number of trial welding times is 3-5 times; The frequency, power, amplitude and height data of all welding corresponding to the number of trial welding are saved to obtain welding data.

[0013] Optionally, in the ultrasonic metal welding result detection system described in the embodiment of the present application, the metal is welded based on the welding parameters and the welding data is acquired in real time, and then the following is further included: After the trial welding is completed, the trial welding data is fitted to obtain the trial welding fitting data; After that, each welding process sets the frequency, power, amplitude and height data of different welding processes, and obtains the current welding data; Calculate the mean square error of the current welding data and the trial welding fitting data to obtain the calculation result; The calculation results are normalized.

[0014] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium includes an ultrasonic metal welding result detection method program. When the ultrasonic metal welding result detection method program is executed by a processor, the steps of the ultrasonic metal welding result detection method as described in any one of the above items are implemented.

[0015] As can be seen from the above, an ultrasonic metal welding result detection method, system and medium provided in the embodiments of the present application obtain welding parameters based on an ultrasonic generator, weld the metal based on the welding parameters and obtain welding data in real time; try welding several times to obtain trial welding data; compare the real-time welding data with the trial welding data to obtain data deviation; determine whether the data deviation is greater than or equal to a set deviation threshold; if greater than or equal to, determine that the welded product is a defective product; if less than, determine that the welded product is a good product; weld the metal through an ultrasonic generator to obtain welding data, test the welding data to obtain tensile force data, and accurately analyze the yield of the welding product based on the analysis result of the tensile force data, thereby accurately obtaining the welding result. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A flow chart of a method for detecting ultrasonic metal welding results provided in an embodiment of the present application; Figure 2 A flow chart of a welding data acquisition method of an ultrasonic metal welding result detection method provided in an embodiment of the present application; Figure 3 A flow chart of a welding data processing method for an ultrasonic metal welding result detection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0019] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0020] Please refer to Figure 1 , Figure 1 This is a flow chart of an ultrasonic metal welding result detection method in some embodiments of the present application. The ultrasonic metal welding result detection method is used in a terminal device, and the ultrasonic metal welding result detection method includes the following steps: S101, obtaining welding parameters based on an ultrasonic generator, welding the metal based on the welding parameters and obtaining welding data in real time; S102, test welding several times to obtain test welding data; S103, comparing the real-time welding data with the trial welding data to obtain a data deviation; S104, determining whether the data deviation is greater than or equal to a set deviation threshold; S105, if it is greater than or equal to, the welded product is determined to be a defective product; if it is less than, the welded product is determined to be a good product.

[0021] It should be noted that by selecting different welding parameters through the ultrasonic generator and testing the welding data obtained in real time, the tensile data is obtained. By analyzing the abnormalities of the tensile data, the good and bad welding results are classified to obtain accurate welding detection results and improve the detection accuracy.

[0022] Please refer to Figure 2 , Figure 2 The present invention is a flowchart of a welding data acquisition method of an ultrasonic metal welding result detection method in some embodiments of the present invention. According to an embodiment of the present invention, welding parameters are acquired based on an ultrasonic generator, and metal is welded based on the welding parameters and welding data is acquired in real time, specifically including: S201, through Modbus RTU communication protocol, obtains complete frequency, power and amplitude data from the ultrasonic generator during the entire welding process; S202, obtaining height data of the entire welding process by reading the encoder value of the grating ruler in real time; S203, setting the number of trial welding times, performing trial welding on the product, and recording the frequency, power, amplitude, and height data of each welding. The number of trial welding times is 3-5 times; S204, the frequency, power, amplitude, and height data of all weldings corresponding to the number of trial weldings are saved to obtain welding data.

[0023] It should be noted that by setting the number of trial welding times, trial welding is performed on the product, and analysis and optimization are performed based on the data recorded during the trial welding, and data with large errors are eliminated to obtain welding data.

[0024] Please refer to Figure 3 , Figure 3 The flowchart of a welding data processing method of an ultrasonic metal welding result detection method in some embodiments of the present application is shown in FIG. According to an embodiment of the present invention, metal is welded based on welding parameters and welding data is obtained in real time, and then the following is further included: S301, after the trial welding is completed, fitting the trial welding data to obtain trial welding fitting data; S302, after that, each welding is performed to set the frequency, power, amplitude and height data of different welding, and obtain the current welding data; S303, calculating the mean square error of the current welding data and the trial welding fitting data to obtain a calculation result; S304, normalizing the calculation results.

[0025] It should be noted that by setting different frequencies, powers, amplitudes and height data for curve fitting, the fluctuation of the data can be obtained, and the mean square error of the curve is calculated to improve the accuracy of welding data acquisition, realize the normalization of welding data, and improve the accuracy of welding data reflection.

[0026] According to an embodiment of the present invention, trial welding is performed several times to obtain trial welding data, which specifically includes: Construct a test model, input welding data into the test model, and obtain the test prediction results; Compare the test prediction results with the set test results to obtain the prediction difference value; Determine whether the predicted difference value is greater than or equal to the set detection threshold; If it is greater than or equal to, then generate correction information, and optimize the model parameters of the test model based on the correction information; If it is less than, the welding tensile force data is obtained based on the test prediction results.

[0027] It should be noted that by constructing a test model to predict the welding test results, the predicted difference values ​​are analyzed, the model parameters are continuously corrected, and the output accuracy of the test model is improved.

[0028] According to an embodiment of the present invention, a test model is constructed, welding data is input into the test model, and a test prediction result is obtained, which specifically includes: Construct a linear regression model, establish a training set based on historical data, iteratively train the linear regression model, and obtain training results; Determine whether the training results converge; If converged, a test model is generated; If it does not converge, adjust the number of iterations or update the model parameters of the linear regression model.

[0029] It should be noted that the linear regression model formula is as follows:

[0030] represents the predicted value of the i-th sample; σ(zi): Sigmoid function is applied to zi, mapping the value of zi to the range of (0, 1)(0, 1); Zi represents the weighted sum of the i-th sample, which is calculated as w0+w1*Qi; w0 and w1 are model parameters, including a bias term w0 and a weight w1; Qi represents the first eigenvalue of the i-th sample; The output of the function is the predicted probability after transformation by the Sigmoid function; Gradient calculation and update weights w0, w1. In order to minimize the loss function, the gradient descent algorithm is used to update the weights. It is necessary to calculate the gradient of the loss function relative to each parameter and update the parameters according to these gradients. Here, the mean square error loss function is used, and the formula is as follows:

[0031] In order to minimize the loss function, it is necessary to calculate the gradient of the loss function for each parameter, as follows: The gradient of the bias term w0 is calculated as follows:

[0032] where zi=w0+w1*Qi+w2*Ni, and σ′(zi)=σ(zi)(1−σ(zi)).

[0033] The gradient of weight w1 is calculated as follows:

[0034] In each iteration, the parameters are updated according to the following formula:

[0035] Where η is the learning rate, which controls the step size of parameter updates.

[0036] Pass η and the number of iterations as parameters, then repeat the iterative training to obtain the final w0 and w1, complete the training of the model, and get the final predicted N value.

[0037] According to an embodiment of the present invention, the method of obtaining welding parameters based on an ultrasonic generator, welding metals based on the welding parameters and obtaining welding data in real time also includes: Obtain welding parameters, including welding frequency, power and amplitude; Calculate the respective weight values ​​based on welding frequency, power and amplitude; Generate corresponding weight coefficients based on the weight values, and multiply the respective weight coefficients by the corresponding welding frequency, power or amplitude to obtain different welding parameters; Corresponding welding data is obtained based on different welding parameters.

[0038] It should be noted that different weights are set for different welding parameters, so that the welding data corresponding to different welding parameters can improve the selectivity of welding parameters.

[0039] According to an embodiment of the present invention, the method further includes: for each welding, the frequency, power, amplitude and height data of the new welding are used to calculate the mean square error with the fitted curve, and the calculation formula is as follows: MSE = (1 / n) * Σ(yi - ŷi)² Among them, MSE represents mean square error, n represents the number of samples, yi represents the actual observed value, ŷi represents the predicted value, and Σ represents the sum.

[0040] Normalize the MES to ensure that all data are within the range of 0 to 1, which is convenient for subsequent calculation and judgment; MES1, MES2, MES3, and MES4 are the mean square errors of frequency, power, amplitude, and height, respectively; The maximum values ​​of MES1, MES2, MES3, and MES4 are max1, max2, max3, and max4, respectively, and the default value is 100000. When a larger value appears, the larger value is assigned to max; the minimum values ​​are min1, min2, min3, and min4, respectively, and the default value is 0. The normalization formula is as follows: MES1' = (MES1 - min1) / ( max1 - min1) MES2' = (MES2 – min2) / ( max2 – min2) MES3' = (MES3 – min3) / ( max3 – min3) MES4' = (MES4 – min4) / ( max4 - min4) Calculate the pass judgment threshold Q for this welding. Assume that the influence factors of MES1, MES2, MES3, and MES4 on Q are a1, a2, a3, and a4 respectively, and the sum of these factors is 1.

[0041] Q =a1*MES1' + a2*MES2' + a3*MES3' + a4*MES4' Among them, a1, a2, a3, and a4 are weight coefficients and satisfy (a1 + a2 + a3 + a4 = 1). Different weight coefficients are set because in ultrasonic metal welding, the fluctuations of different parameter types have completely different effects on the welding effect. Due to the voltage stabilization algorithm in the ultrasonic generator, the power fluctuation is not large, but the frequency difference is very large. At this time, the Q value represents the fluctuation between the newly welded data and the pass data of the trial welding. The closer the Q value is to 0, the smaller the fluctuation. A threshold T can be set. If T>Q, it means it is a pass; if T<Q, it means it is a failure.

[0042] In a second aspect, the embodiments of the present application provide an ultrasonic metal welding result detection system, which includes: a memory and a processor. The memory includes a program for the ultrasonic metal welding result detection method. When the program for the ultrasonic metal welding result detection method is executed by the processor, the following steps are implemented: Obtain welding parameters based on the ultrasonic generator, weld the metal based on the welding parameters, and obtain welding data in real time; Conduct trial welding several times to obtain trial welding data; Compare the real-time welding data with the trial welding data to obtain a data deviation; Judge whether the data deviation is greater than or equal to a set deviation threshold; If it is greater than or equal to, determine that the welded product is a failure; If it is less than, determine that the welded product is a pass.

[0043] It should be noted that by selecting different welding parameters through the ultrasonic generator and testing the welding data obtained in real time, the tensile data is obtained. By analyzing the abnormalities of the tensile data, the good and bad welding results are classified to obtain accurate welding detection results and improve the detection accuracy.

[0044] According to an embodiment of the present invention, obtaining welding parameters based on an ultrasonic generator, welding metals based on the welding parameters and obtaining welding data in real time specifically include: Obtain complete frequency, power and amplitude data from the ultrasonic generator during the entire welding process through Modbus RTU communication protocol; By reading the encoder value of the grating ruler in real time, the height data of the entire welding process can be obtained; Set the number of trial welding times, conduct trial welding on the product, and record the frequency, power, amplitude, and height data of each welding. The number of trial welding times is 3-5 times; The frequency, power, amplitude and height data of all welding corresponding to the number of trial welding are saved to obtain welding data.

[0045] It should be noted that by setting the number of trial welding times, trial welding is performed on the product, and analysis and optimization are performed based on the data recorded during the trial welding, and data with large errors are eliminated to obtain welding data.

[0046] According to an embodiment of the present invention, welding metals is performed based on welding parameters and welding data is acquired in real time, and then the method further includes: After the trial welding is completed, the trial welding data is fitted to obtain the trial welding fitting data; After that, each welding process sets the frequency, power, amplitude and height data of different welding processes, and obtains the current welding data; Calculate the mean square error of the current welding data and the trial welding fitting data to obtain the calculation result; The calculated results are normalized to ensure that all data are within the range of 0 to 1.

[0047] It should be noted that by setting different frequencies, powers, amplitudes and height data for curve fitting, the fluctuation of the data can be obtained, and the mean square error of the curve is calculated to improve the accuracy of welding data acquisition, realize the normalization of welding data, and improve the accuracy of welding data reflection.

[0048] According to an embodiment of the present invention, trial welding is performed several times to obtain trial welding data, which specifically includes: Construct a test model, input welding data into the test model, and obtain the test prediction results; Compare the test prediction results with the set test results to obtain the prediction difference value; Determine whether the predicted difference value is greater than or equal to the set detection threshold; If it is greater than or equal to, then generate correction information, and optimize the model parameters of the test model based on the correction information; If it is less than, the welding tensile force data is obtained based on the test prediction results.

[0049] It should be noted that by constructing a test model to predict the welding test results, the predicted difference values ​​are analyzed, the model parameters are continuously corrected, and the output accuracy of the test model is improved.

[0050] According to an embodiment of the present invention, a test model is constructed, welding data is input into the test model, and a test prediction result is obtained, which specifically includes: Construct a linear regression model, establish a training set based on historical data, iteratively train the linear regression model, and obtain training results; Determine whether the training results converge; If converged, a test model is generated; If it does not converge, adjust the number of iterations or update the model parameters of the linear regression model.

[0051] It should be noted that the linear regression model formula is as follows:

[0052] represents the predicted value of the i-th sample; σ(zi): Sigmoid function is applied to zi, mapping the value of zi to the range of (0, 1)(0, 1); Zi represents the weighted sum of the i-th sample, which is calculated as w0+w1*Qi; w0 and w1 are model parameters, including a bias term w0 and a weight w1; Qi represents the first eigenvalue of the i-th sample; The output of the function is the predicted probability after transformation by the Sigmoid function; Gradient calculation and update weights w0, w1. In order to minimize the loss function, the gradient descent algorithm is used to update the weights. It is necessary to calculate the gradient of the loss function relative to each parameter and update the parameters according to these gradients. Here, the mean square error loss function is used, and the formula is as follows:

[0053] In order to minimize the loss function, it is necessary to calculate the gradient of the loss function for each parameter, as follows: The gradient of the bias term w0 is calculated as follows:

[0054] where zi=w0+w1*Qi+w2*Ni, and σ′(zi)=σ(zi)(1−σ(zi)).

[0055] The gradient of weight w1 is calculated as follows:

[0056] In each iteration, the parameters are updated according to the following formula:

[0057] Where η is the learning rate, which controls the step size of parameter updates.

[0058] Pass η and the number of iterations as parameters, then repeat the iterative training to obtain the final w0 and w1, complete the training of the model, and get the final predicted N value.

[0059] According to an embodiment of the present invention, the method of obtaining welding parameters based on an ultrasonic generator, welding metals based on the welding parameters and obtaining welding data in real time also includes: Obtain welding parameters, including welding frequency, power and amplitude; Calculate the respective weight values ​​based on welding frequency, power and amplitude; Generate corresponding weight coefficients based on the weight values, and multiply the respective weight coefficients by the corresponding welding frequency, power or amplitude to obtain different welding parameters; Corresponding welding data is obtained based on different welding parameters.

[0060] It should be noted that different weights are set for different welding parameters, so that the welding data corresponding to different welding parameters can improve the selectivity of welding parameters.

[0061] According to an embodiment of the present invention, the method further includes: for each welding, the frequency, power, amplitude and height data of the new welding are used to calculate the mean square error with the fitted curve, and the calculation formula is as follows: MSE = (1 / n) * Σ(yi - ŷi)² Among them, MSE represents mean square error, n represents the number of samples, yi represents the actual observed value, ŷi represents the predicted value, and Σ represents the sum.

[0062] Normalize the MES to ensure that all data are within the range of 0 to 1, which is convenient for subsequent calculation and judgment; MES1, MES2, MES3, and MES4 are the mean square errors of frequency, power, amplitude, and height, respectively; The maximum values of MES1, MES2, MES3, and MES4 are max1, max2, max3, and max4 respectively, with a default value of 100,000. When a larger value appears, the larger value is assigned to max. The minimum values are min1, min2, min3, and min4 respectively, with a default value of 0. The normalization formula is as follows: MES1' = (MES1 - min1) / ( max1 - min1) MES2' = (MES2 – min2) / ( max2 – min2) MES3' = (MES3 – min3) / ( max3 – min3) MES4' = (MES4 – min4) / ( max4 - min4) Calculate the qualified product judgment threshold Q for this welding. Assume that the influence factors of MES1, MES2, MES3, and MES4 on Q are a1, a2, a3, and a4 respectively, and the sum of these factors is 1.

[0063] Q =a1*MES1' + a2*MES2' + a3*MES3' + a4*MES4' Among them, a1, a2, a3, and a4 are weight coefficients and satisfy ( a1 + a2 + a3 + a4 = 1 ). Different weight coefficients are set because in ultrasonic metal welding, the fluctuations of different parameter types have completely different effects on the welding effect. Due to the voltage stabilization algorithm in the ultrasonic generator, the power fluctuation is not large, but the frequency difference is very large. At this time, the Q value represents the fluctuation between the newly welded data and the qualified product data of the trial welding. The closer the Q value is to 0, the smaller the fluctuation. A threshold T can be set, where T>Q indicates a qualified product, and T<Q indicates a defective product.

[0064] The third aspect of the present invention provides a computer-readable storage medium. The computer-readable storage medium includes a program for the ultrasonic metal welding result detection method. When the program for the ultrasonic metal welding result detection method is executed by a processor, the steps of the ultrasonic metal welding result detection method as described in any one of the above are implemented.

[0065] The present invention discloses an ultrasonic metal welding result detection method, system and medium, which obtain welding parameters based on an ultrasonic generator, weld metal based on the welding parameters and obtain welding data in real time; perform trial welding several times to obtain trial welding data; compare the real-time welding data with the trial welding data to obtain data deviation; determine whether the data deviation is greater than or equal to a set deviation threshold; if greater than or equal to, determine that the welded product is a defective product; if less than, determine that the welded product is a good product; weld metal through an ultrasonic generator to obtain welding data, test the welding data to obtain tension data, accurately analyze the yield rate of the welding product according to the analysis result of the tension data, and thus accurately obtain the welding result.

[0066] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of 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 can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0067] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; 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.

[0068] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0069] A person skilled in the art can understand that all or part of the steps of the above method embodiment can be completed by hardware related to program instructions, and the above program can be stored in a readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium includes: mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc. Various media that can store program codes.

[0070] Or, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, 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, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

Claims

1. A method for detecting ultrasonic metal welding results, characterized in that: include: Acquire welding parameters based on an ultrasonic generator, weld metals based on the welding parameters and acquire welding data in real time; Try welding several times to get test welding data; Compare the real-time welding data with the trial welding data to obtain the data deviation; Determine whether the data deviation is greater than or equal to a set deviation threshold; If it is greater than or equal to, the welded product is judged as defective; If it is less than , the welded product is judged to be good.

2. The method for detecting ultrasonic metal welding results according to claim 1, characterized in that: Obtain welding parameters based on an ultrasonic generator, weld metals based on the welding parameters and obtain welding data in real time, specifically including: Obtain complete frequency, power and amplitude data from the ultrasonic generator during the entire welding process through Modbus RTU communication protocol; By reading the encoder value of the grating ruler in real time, the height data of the entire welding process can be obtained; Set the number of trial welding times, conduct trial welding on the product, and record the frequency, power, amplitude, and height data of each welding. The number of trial welding times is 3-5 times; The frequency, power, amplitude and height data of all welding corresponding to the number of trial welding are saved to obtain welding data.

3. The method for detecting ultrasonic metal welding results according to claim 2, characterized in that: Weld the metal based on the welding parameters and obtain the welding data in real time, followed by: After the trial welding is completed, the trial welding data is fitted to obtain the trial welding fitting data; After that, each welding process sets the frequency, power, amplitude and height data of different welding processes, and obtains the current welding data; Calculate the mean square error of the current welding data and the trial welding fitting data to obtain the calculation result; The calculation results are normalized.

4. The method for detecting ultrasonic metal welding results according to claim 3, characterized in that: After several trial weldings and obtaining the trial welding data, it also includes: Construct a test model, input welding data into the test model, and obtain the test prediction results; Compare the test prediction results with the set test results to obtain the prediction difference value; Determining whether the predicted difference value is greater than or equal to a set detection threshold; If it is greater than or equal to, then generate correction information, and optimize the model parameters of the test model based on the correction information; If it is less than, the welding tensile force data is obtained based on the test prediction results.

5. The method for detecting ultrasonic metal welding results according to claim 4, characterized in that: Construct a test model, input welding data into the test model, and obtain test prediction results, including: Construct a linear regression model, establish a training set based on historical data, iteratively train the linear regression model, and obtain training results; Determining whether the training result converges; If converged, a test model is generated; If it does not converge, adjust the number of iterations or update the model parameters of the linear regression model.

6. The method for detecting ultrasonic metal welding results according to claim 1, characterized in that: Obtain welding parameters based on an ultrasonic generator, weld metal based on the welding parameters and obtain welding data in real time, and also include: Obtain welding parameters, including welding frequency, power and amplitude; Calculate the respective weight values ​​based on welding frequency, power and amplitude; Generate corresponding weight coefficients based on the weight values, and multiply the respective weight coefficients by the corresponding welding frequency, power or amplitude to obtain different welding parameters; Corresponding welding data is obtained based on different welding parameters.

7. An ultrasonic metal welding result detection system, characterized in that: The system includes: a memory and a processor, wherein the memory includes a program of an ultrasonic metal welding result detection method, and when the program of the ultrasonic metal welding result detection method is executed by the processor, the following steps are implemented: Acquire welding parameters based on an ultrasonic generator, weld metals based on the welding parameters and acquire welding data in real time; Try welding several times to get test welding data; Compare the real-time welding data with the trial welding data to obtain the data deviation; Determine whether the data deviation is greater than or equal to a set deviation threshold; If it is greater than or equal to, the welded product is judged as defective; If it is less than , the welded product is judged to be good.

8. The ultrasonic metal welding result detection system according to claim 7, characterized in that: Obtain welding parameters based on an ultrasonic generator, weld metals based on the welding parameters and obtain welding data in real time, specifically including: Obtain complete frequency, power and amplitude data from the ultrasonic generator during the entire welding process through Modbus RTU communication protocol; By reading the encoder value of the grating ruler in real time, the height data of the entire welding process can be obtained; Set the number of trial welding times, conduct trial welding on the product, and record the frequency, power, amplitude, and height data of each welding. The number of trial welding times is 3-5 times; The frequency, power, amplitude and height data of all welding corresponding to the number of trial welding are saved to obtain welding data.

9. The ultrasonic metal welding result detection system according to claim 8, characterized in that: Weld the metal based on the welding parameters and obtain the welding data in real time, followed by: After the trial welding is completed, the trial welding data is fitted to obtain the trial welding fitting data; After that, each welding process sets the frequency, power, amplitude and height data of different welding processes, and obtains the current welding data; Calculate the mean square error of the current welding data and the trial welding fitting data to obtain the calculation result; The calculation results are normalized.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes an ultrasonic metal welding result detection method program, and when the ultrasonic metal welding result detection method program is executed by a processor, the steps of the ultrasonic metal welding result detection method according to any one of claims 1 to 6 are implemented.