A welding quality real-time evaluation method based on current-voltage waveform template matching

CN122807371APending Publication Date: 2026-09-25WUHAN ZHIJIAN TIANCHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611262333.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0004]然而,发明人发现相关技术中存在以下技术缺陷:由于不同操作者或在不同操作条件下的焊接移动速度往往存在不可控的差异,单纯依赖基于时间的线性插值处理会对整个波形数据序列进行等比例的均匀拉伸或压缩;这种时间映射导致波形中包含的起弧瞬态抖动或短路过渡尖峰等瞬态特征发生一定的时间轴错位,进而在模板匹配比对阶段产生非焊接质量因素导致的误差放大,增加对实际焊接质量的误判的概率

Benefits of technology

[0007]本申请实施例,通过上述技术方案,本方案按瞬时功率的累积能量划分区间,使波形序列的每个元素位置始终对应于焊接能量输入的同一进度阶段,特征比对建立在与焊接物理进程一致的基准上,消除了焊接速度差异对波形比对的影响。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122807371A_ABST
    Figure CN122807371A_ABST
Patent Text Reader

Abstract

The application relates to the field of welding, and discloses a welding quality real-time evaluation method based on current-voltage waveform template matching, which comprises the following steps: acquiring current data and voltage data of a welding process to be evaluated and determining an instantaneous power value; obtaining a total welding energy value and dividing the total welding energy value into multiple equal energy intervals; determining cumulative energy values corresponding to each time node; dividing the current data and the voltage value corresponding to the time node into the corresponding energy interval based on the cumulative energy value; respectively determining corresponding current characteristic values and voltage characteristic values; generating a current sequence under energy coordinates and a voltage sequence under energy coordinates; and comparing the current sequence under energy coordinates and the voltage sequence under energy coordinates with preset standard energy coordinate templates respectively to determine a quality evaluation result of the welding process to be evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of welding control, and in particular to a real-time welding quality assessment method based on current and voltage waveform template matching. Background Technology

[0002] In automated or semi-automated welding production, welding quality is affected by operating techniques and equipment stability. Real-time monitoring of each welding process is the key to ensuring product qualification rate.

[0003] In existing welding quality assessment technologies based on waveform template matching, current and voltage data of the welding process are typically acquired. The average number of data points of all qualified waveforms is calculated, and the time axis of the waveform is normalized to a fixed length using linear interpolation. Then, the average absolute error between each point and the standard template is calculated to evaluate the quality.

[0004] However, the inventors discovered the following technical defects in the related technology: Since the welding movement speed of different operators or under different operating conditions often has uncontrollable differences, simply relying on time-based linear interpolation processing will uniformly stretch or compress the entire waveform data sequence proportionally; this time mapping causes a certain time axis misalignment of transient features such as arc-starting transient jitter or short-circuit transition spikes contained in the waveform, which in turn amplifies the error caused by non-welding quality factors in the template matching and comparison stage, increasing the probability of misjudging the actual welding quality. Summary of the Invention

[0005] This application provides a real-time welding quality assessment method based on current and voltage waveform template matching, which at least partially solves the above-mentioned technical problems.

[0006] To achieve the above objectives, this application provides a real-time welding quality assessment method based on current and voltage waveform template matching, comprising: Obtain current and voltage data for the welding process to be evaluated; The instantaneous power value is determined based on each current data point in the current data and the voltage value at the corresponding time node in the voltage data; The total welding energy value is obtained by accumulating and integrating the instantaneous power value at corresponding time intervals, and then the total welding energy value is divided into multiple equally divided energy intervals. The instantaneous power values ​​are accumulated according to the chronological order of the time nodes to determine the cumulative energy value corresponding to each time node; Based on the accumulated energy value, the current data and voltage value at the corresponding time node are divided into the corresponding energy range; Among all the current data and all the voltage values ​​that are divided into the same equal energy interval, the corresponding current characteristic value and voltage characteristic value are determined respectively. Based on the arrangement order of the energy range, the determined current characteristic values ​​and voltage characteristic values ​​are arranged in order to generate the current sequence and voltage sequence in the energy coordinate. The current sequence and voltage sequence under the energy coordinates are compared with a preset standard energy coordinate template to determine the quality assessment result of the welding process to be evaluated.

[0007] In this embodiment of the application, the above technical solution divides the interval according to the cumulative energy of instantaneous power, so that the position of each element of the waveform sequence always corresponds to the same progress stage of welding energy input. The feature comparison is established on a reference consistent with the welding physical process, eliminating the influence of welding speed difference on waveform comparison.

[0008] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart illustrating the steps of a real-time welding quality assessment method based on current and voltage waveform template matching provided in an exemplary embodiment of this application. Detailed Implementation

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

[0012] This application provides a real-time welding quality assessment method based on current and voltage waveform template matching. Please refer to [link / reference]. Figure 1 The real-time welding quality evaluation method based on current and voltage waveform template matching provided in this application includes the following steps: S101. Acquire current and voltage data of the welding process to be evaluated. A current sensor and a voltage sensor are configured at the output of the welding power supply to synchronously acquire real-time current and voltage data during the welding process at a set sampling frequency. The current sensor is connected in series in the welding circuit to acquire the instantaneous value of the welding current, and the voltage sensor is connected in parallel between the welding torch and the workpiece to acquire the instantaneous value of the arc voltage; each sampling point corresponds to a time node, forming equally spaced discrete current data sequences and discrete voltage data sequences.

[0013] S102. Determine the instantaneous power value based on each current data point in the current data and the voltage value at the corresponding time node in the voltage data. For each time node, multiply the current data collected at that node with the voltage value at the same node point by point to obtain the instantaneous power value at that time node.

[0014] S103. Based on the instantaneous power value, the total welding energy value is obtained by accumulating and integrating at corresponding time node intervals, and the total welding energy value is divided into multiple equally divided energy intervals. Following the chronological order of the time nodes, the instantaneous power value between adjacent time nodes is multiplied by the sampling time interval to obtain the energy increment within that time period. All energy increments are accumulated segment by segment to obtain the total welding energy value for the entire welding process. The total welding energy value is divided into multiple energy intervals, each with the same energy width. By using energy coordinates instead of time coordinates, segments with faster welding speeds are naturally allocated to more intervals due to the greater energy input per unit time, while segments with slower welding speeds are allocated to fewer intervals. This ensures that each interval position corresponds to the same progress stage of welding energy input, rather than the same absolute time point, eliminating feature misalignment caused by differences in welding movement speed.

[0015] S104. Accumulate the instantaneous power values ​​according to the chronological order of the time nodes to determine the cumulative energy value corresponding to each time node. Starting from the welding start time, accumulate the product of the instantaneous power value corresponding to each time node and the sampling interval point by point according to the chronological order of the time nodes to obtain the cumulative energy value of each time node.

[0016] S105. Based on the cumulative energy value, the current data and voltage value at the corresponding time node are divided into the corresponding energy intervals. Each time node is traversed, and the cumulative energy value of that node is compared with the boundary of each energy interval to determine the energy interval number it falls into. The current data and voltage value corresponding to that node are then assigned to that interval.

[0017] S106. Among all the current data and all the voltage values ​​divided into the same equal energy interval, determine the corresponding current characteristic value and voltage characteristic value respectively. Within each energy interval, select a representative value from all the current data contained in the interval as the current characteristic value of the interval according to a preset rule, and select a representative value from all the voltage values ​​contained in the interval as the voltage characteristic value of the interval.

[0018] S107. Based on the arrangement order of the energy intervals, the determined current characteristic values ​​and voltage characteristic values ​​are arranged sequentially to generate a current sequence and a voltage sequence in energy coordinates. Following the ascending order of energy intervals, the determined current characteristic values ​​of each interval are arranged sequentially to form a current sequence in energy coordinates, and the determined voltage characteristic values ​​of each interval are arranged sequentially to form a voltage sequence in energy coordinates. The sequence length is equal to the number of energy interval divisions.

[0019] S108. The current sequence and voltage sequence under the energy coordinates are compared with a preset standard energy coordinate template to determine the quality assessment result of the welding process to be evaluated. The current sequence and voltage sequence under the energy coordinates of the welding process to be evaluated are compared with the preset standard energy coordinate template one by one at the corresponding energy range positions, and the quality assessment result is obtained according to the preset error evaluation rules.

[0020] The above technical solution addresses the issue that during welding operations, the welding torch's movement speed varies uncontrollably due to factors such as operator technique and welding position. If waveform sequences are compared using time as a benchmark, faster welding speed segments are compressed on the time axis, while slower segments are stretched. This leads to misalignment of transient current spikes during arc initiation and arc restart characteristics during short-circuit transitions on the time axis. Consequently, previously acceptable welding waveforms exhibit comparison deviations not caused by quality factors due to these feature misalignments. This solution divides the waveform sequence into intervals based on the cumulative energy of instantaneous power, ensuring that each element corresponds to the same stage of welding energy input. Feature comparison is established on a benchmark consistent with the physical process of welding, eliminating the influence of welding speed differences on waveform comparison.

[0021] In some embodiments, among all the current data and all the voltage values ​​divided into the same equally divided energy interval, corresponding current characteristic values ​​and voltage characteristic values ​​are determined respectively, including: Within each of the equal energy intervals, all the current data and voltage values ​​contained therein are divided into multiple time windows of equal length according to the corresponding time node sequence. Within each energy interval, all the current data and voltage values ​​contained in that interval are divided into several time windows of equal length according to the original time node sequence. Each time window contains multiple sets of continuously sampled current and voltage data.

[0022] The average current value is generated by calculating the average value of all current data within each time window, and the average voltage value is generated by calculating the average value of all voltage values ​​within each time window. The average current value for each time window is generated by calculating the arithmetic mean of all current data within each time window, and the average voltage value for each time window is generated by calculating the arithmetic mean of all voltage values ​​within each time window.

[0023] Determine the maximum mean value among the mean current values ​​corresponding to all the time windows. Iterate through the mean current values ​​corresponding to all time windows within the energy range and find the one with the largest value.

[0024] The maximum current value contained within the first time window that generates the maximum average current value is used as the current characteristic value. Within the first time window that generates the maximum average current value, all current data within the window are traversed, and the current value with the largest value is found and used as the current characteristic value of that energy range.

[0025] Determine the minimum mean among the voltage mean values ​​corresponding to all the time windows. Iterate through the voltage mean values ​​corresponding to all time windows within the energy range and find the one with the smallest value.

[0026] The minimum voltage value contained within the second time window that generates the minimum average voltage value is taken as the voltage characteristic value. Within the second time window that generates the minimum average voltage value, all voltage values ​​within the window are traversed, and the voltage value with the smallest value is found and taken as the voltage characteristic value of that energy range.

[0027] The above technical solution first locates the time window with the most significant data characteristics by calculating the mean within the window, and then takes the extreme value within the window. By using the statistical consistency of the data within the time window to filter out isolated interference points, the selected feature values ​​can more accurately reflect the true electrical characteristics of the welding arc within the energy range.

[0028] In some embodiments, the maximum current value contained within the first time window that generates the maximum average value is used as the current characteristic value, including: Step S301: Identify the candidate feature value with the largest value within the first time window and locate the time node corresponding to the candidate feature value to generate a candidate time node. Within the first time window, check each current data in descending order of value. First, select the current data with the largest value as the candidate feature value and record its corresponding sampling time node as the candidate time node.

[0029] Step S302: Based on the candidate time nodes, acquire the preceding current data at the position adjacent to the candidate time node and the following current data at the position adjacent to the candidate time node within the first time window. According to the candidate time nodes, acquire the preceding current data at the sampling position preceding the node and the following current data at the sampling position following the node within the first time window.

[0030] Step S303: Calculate the difference between the candidate feature value and the preceding current data to determine the leading edge difference, and calculate the difference between the candidate feature value and the following current data to determine the trailing edge difference. The absolute value of the difference between the candidate feature value and the preceding current data is taken as the leading edge difference. The absolute value of the difference between the candidate feature value and the following current data is taken as the trailing edge difference.

[0031] Step S304: Determine the transition value based on the leading edge difference and the trailing edge difference. Take the larger of the leading edge difference and the trailing edge difference as the transition value. The larger the transition value, the steeper the current change between the candidate feature value and its adjacent sampling points.

[0032] Step S305: When the jump value is greater than a preset continuity threshold, the candidate feature value is determined to be an interference value and the interference value is removed from the first time window. The jump value is compared with the preset continuity threshold. If the jump value is greater than the continuity threshold, the candidate feature value is determined to be an isolated interference value and is removed from the selectable dataset of the first time window. The continuity threshold is set according to the rated current and sampling frequency of the welding power supply. Its value is chosen so that the variation of adjacent sampling points of normal welding current does not exceed the limit, while the jump value of electromagnetic interference spikes exceeds the limit.

[0033] Step S306: Repeat the step of identifying the candidate feature value with the largest value until the jump value corresponding to the newly identified candidate feature value is not greater than the continuity threshold. After removing interference values, re-execute the identification and jump test steps S301 to S305 in the remaining data.

[0034] Step S307: The candidate feature value that satisfies the condition that the jump value is not greater than the continuity threshold is used as the current feature value. When the jump value corresponding to the candidate feature value in a certain iteration is not greater than the continuity threshold, the candidate feature value is used as the current feature value of that energy range.

[0035] The above technical solution introduces a continuity check for jumps during the selection of current characteristic values, ensuring that the selected characteristic values ​​originate from the continuously changing actual welding arc process rather than isolated electromagnetic interference. The electromagnetic environment at the welding site is complex, and current sensors may occasionally capture isolated spike data points caused by external electromagnetic pulses or instantaneous saturation of the sampling circuit. While these spikes may numerically represent the maximum value within the time window, they exhibit unnatural, steep jumps compared to adjacent sampling points. By examining the jump amplitude between candidate values ​​and their adjacent data and comparing it with a continuity threshold, isolated interference data can be identified and eliminated, preventing interference values ​​from contaminating the current sequence in the energy coordinate system.

[0036] In some embodiments, the preset standard energy coordinate template is pre-generated based on the following steps: Step S401: Obtain multiple qualified current data and multiple qualified voltage data corresponding to multiple welding processes that were in a qualified state in history. Collect the original current data and voltage data of multiple historical welding processes that have been confirmed as qualified by manual judgment or metallographic inspection. The data of each qualified welding process is stored at the same sampling frequency as the process to be evaluated.

[0037] Step S402: Calculate the current sequence and voltage sequence under multiple historical energy coordinates corresponding to each qualified current data and the corresponding qualified voltage data. For each qualified welding process, perform the same processing flow as S101 to S107 to convert the original current data and voltage data into current and voltage sequences under historical energy coordinates.

[0038] Step S403: Obtain multiple current characteristic values ​​of the current sequence under all historical energy coordinates at the index position of the same equally divided energy interval, and obtain multiple voltage characteristic values ​​of the voltage sequence under all historical energy coordinates at the index position of the same equally divided energy interval. At the index position of the i-th energy interval, collect the current characteristic values ​​generated at that position by the current sequence of all qualified welding processes to form a set of current characteristic values ​​at that position. Collect the set of voltage characteristic values ​​at that position in the same way.

[0039] Step S404: Determine the first median value of the plurality of current characteristic values ​​as the current reference data of the standard energy coordinate template at that index position. For the set of current characteristic values ​​of the i-th energy interval, sort them by value and take the median value as the current reference data of the standard energy coordinate template at the i-th position.

[0040] Step S405: Determine the second median value of the plurality of voltage characteristic values ​​as the voltage reference data of the standard energy coordinate template at that index position. For the voltage characteristic value set of the i-th energy interval, sort by value and take the median value as the voltage reference data of the standard energy coordinate template at the i-th position. After traversing all energy intervals, a complete current reference data sequence and a voltage reference data sequence are obtained, which together constitute the standard energy coordinate template.

[0041] Through the above technical solution, the standard energy coordinate template is constructed using the statistical median of multiple sets of historical qualified welding process data, rather than relying solely on a single qualified waveform. Even in a qualified state, the current and voltage waveforms of the welding process will exhibit normal fluctuations due to factors such as material batches and ambient temperature. If a single qualified waveform is used as the comparison template, normal fluctuations may be misjudged as deviations. By using the median of multiple sets of qualified waveforms as the reference value, the template automatically converges to the central trend of the qualified state, making the comparison benchmark more statistically stable.

[0042] In some embodiments, determining the quality assessment result of the welding process to be evaluated includes: Step S501: Under the same arrangement order of the equally divided energy intervals, obtain the first absolute difference between the current sequence under the energy coordinates and the corresponding position element of the current reference data, and the second absolute difference between the voltage sequence under the energy coordinates and the corresponding position element of the voltage reference data. Traverse each energy interval, at the same index position, calculate the absolute value of the difference between the element at that position in the current sequence and the corresponding position element in the current reference data as the first absolute difference, and calculate the absolute value of the difference between the element at that position in the voltage sequence and the corresponding position element in the voltage reference data as the second absolute difference.

[0043] Step S502: Determine a first relative difference based on the first absolute difference and the current reference data, and determine a second relative difference based on the second absolute difference and the voltage reference data. Divide the first absolute difference by the value of the element at that position in the current reference data to obtain the first relative difference, and divide the second absolute difference by the value of the element at that position in the voltage reference data to obtain the second relative difference. Dividing by the reference value normalizes the absolute deviation differences between different energy ranges caused by different fundamental current or voltage magnitudes, making the deviations of each range comparable.

[0044] Step S503: Determine the cross-power error by multiplying the first relative difference and the second relative difference within the same equally divided energy interval. Within the same energy interval, the first relative difference and the second relative difference are multiplied to obtain the cross-power error for that interval. The multiplication operation ensures that a large cross-power error term is generated only when both current and voltage deviate from the reference value; if only one side deviates, the product remains at a low level.

[0045] Step S504: Determine the cross power deviation based on the cumulative cross power error generated by traversing all the equally divided energy intervals. Traverse all energy intervals and accumulate the cross power error corresponding to each interval item by item.

[0046] Step S505: Determine the basic error value based on the sum of all the first relative differences and the sum of all the second relative differences. The first relative differences across all energy ranges are summed one by one to obtain the total current relative error, and the second relative differences across all energy ranges are summed one by one to obtain the total voltage relative error. The two are then added together to obtain the basic error value.

[0047] Step S506: Determine the current comprehensive error value based on the preset first error weighting coefficient and the basic error value, and the preset second error weighting coefficient and the cross-power deviation, respectively. Multiply the basic error value by the first error weighting coefficient to obtain the weighted basic error, and multiply the cross-power deviation by the second error weighting coefficient to obtain the weighted cross-power deviation. Add the two together to obtain the current comprehensive error value. The first error weighting coefficient and the second error weighting coefficient control the contribution ratio of the single-variable deviation and the combined power deviation in the comprehensive evaluation, respectively, and can be adjusted according to the tolerance differences of different welding processes for current deviation, voltage deviation, and combined power deviation.

[0048] Step S507: Determine the comprehensive error ratio based on the current comprehensive error value and the maximum permissible deviation threshold. Divide the current comprehensive error value by the maximum permissible deviation threshold. When the comprehensive error ratio does not exceed 1, it indicates that the deviation is within the tolerable range.

[0049] Step S508: When the comprehensive error ratio is less than or equal to a preset first benchmark value, a scoring coefficient is determined based on the first benchmark value and the comprehensive error ratio, and a quality deviation score is determined based on the scoring coefficient and a preset full score value as the quality assessment result. The scoring coefficient is obtained by subtracting the comprehensive error ratio from the first benchmark value. The closer the scoring coefficient is to the first benchmark value, the smaller the deviation; the closer it is to zero, the closer the deviation is to the tolerable upper limit. The quality deviation score is obtained by multiplying the scoring coefficient by the preset full score value. If the comprehensive error ratio exceeds the first benchmark value, the quality deviation score is directly set to zero.

[0050] The above technical solution introduces a dual-channel weighted comprehensive mechanism of cross-power error and basic error value for quality assessment. If only the independent summation of current deviation and voltage deviation is used as the error metric, the combined effect of current and voltage deviating from the reference value simultaneously within the same energy range cannot be captured. In actual welding, excessive input energy when both current and voltage are simultaneously high may lead to burn-through, while insufficient energy when both are simultaneously low may lead to incomplete fusion. Such combined deviations are far more detrimental to welding quality than independent deviations of a single variable. Cross-power error amplifies the contribution of simultaneous current and voltage deviations within the same energy range through multiplication, making the quality assessment more sensitive to combined deviations. Simultaneously, setting a first error weighting coefficient and a second error weighting coefficient allows for differentiated configuration based on the tolerance preferences of different welding processes, increasing the versatility of the assessment method across various welding processes.

[0051] In some embodiments, determining a base error value based on the sum of all the first relative differences and the sum of all the second relative differences includes: Step S601: Determine reference gradient data based on the numerical differences between elements at adjacent index positions in the current reference data. In the current reference data, the difference in current reference values ​​between each adjacent index position is calculated to form the reference gradient data. The larger the reference gradient value at a certain index position, the more rapidly the current level is changing near that energy range.

[0052] Step S602: Identify positive abrupt change locations in the reference gradient data where the values ​​are greater than a first preset gradient threshold, and negative abrupt change locations where the values ​​are less than a second preset gradient threshold. Traverse the reference gradient data, marking the index positions where the values ​​are greater than the first preset gradient threshold as positive abrupt change locations, and marking the index positions where the values ​​are less than the second preset gradient threshold as negative abrupt change locations. Positive abrupt change locations correspond to the process of current rapidly rising from a low level to a stable level, while negative abrupt change locations correspond to the process of current rapidly decreasing from a stable level to a low level.

[0053] Step S603: Based on the positive and negative mutation positions, divide the multiple equally divided energy intervals into an arc-starting interval at the beginning, an arc-ending interval at the end, and a stable arc interval in the middle. The energy interval before the positive mutation position is designated as the arc-starting interval, the energy interval after the negative mutation position is designated as the arc-ending interval, and the energy interval between the positive and negative mutation positions is designated as the stable arc interval.

[0054] Step S604: Obtain the absolute values ​​of each reference gradient belonging to the arc initiation interval and the arc termination interval, and determine the interval weight of each energy interval based on the absolute values ​​and a preset conversion coefficient. For each energy interval within the arc initiation interval and the arc termination interval, calculate the absolute value of the reference gradient corresponding to that interval, and multiply the absolute value by the preset conversion coefficient to obtain the interval weight of that energy interval. The larger the absolute value of the reference gradient, the more drastic the current change in that interval, and the larger the interval weight.

[0055] Step S605: Determine the boundary weighted error based on the first relative difference and the second relative difference belonging to the arc initiation interval and the arc termination interval, and the interval weight of the corresponding energy interval. For each energy interval within the arc initiation interval and the arc termination interval, multiply the sum of the first relative difference and the second relative difference of the interval by the interval weight of the interval to obtain the boundary weighted error term of the interval. Accumulate all boundary weighted error terms to obtain the boundary weighted error.

[0056] Step S606: Determine the weighted steady-state error based on the first relative difference and the second relative difference belonging to the stable arc interval and a preset steady-state weight. For each energy interval within the stable arc interval, multiply the sum of the first relative difference and the second relative difference of that interval by the preset steady-state weight, and accumulate to obtain the weighted steady-state error.

[0057] Step S607: Determine the basic error value based on all the boundary weighted errors and the weighted steady-state error. Add the boundary weighted errors and the weighted steady-state error to obtain the basic error value.

[0058] The above technical solution utilizes gradients from current reference data to automatically identify the three stages of the welding process: arc initiation, arc stabilization, and arc termination, and applies differentiated weights to each stage. The arc ignition status during the arc initiation stage and the crater filling quality during the arc termination stage typically have a greater impact on weld joint performance than the minute current fluctuations during the arc stabilization stage. If all energy ranges are given equal weights, the accumulated error from the arc stabilization stage, which accounts for the majority of these ranges, will dominate the total error, masking the quality differences between the critical arc initiation and termination stages. By identifying the three stages through gradients and applying differentiated weights, the basic error value can more accurately reflect the deviations that truly affect weld quality.

[0059] In some embodiments, before the determined current characteristic values ​​and voltage characteristic values ​​are sequentially arranged based on the arrangement order of the equally divided energy intervals to generate a current sequence and a voltage sequence in energy coordinates, the method further includes: Step S701: In the plurality of equally divided energy intervals, retrieve a set of consecutive empty intervals containing zero elements, and locate the preceding and following non-empty intervals immediately adjacent to the set of consecutive empty intervals. Traverse all energy intervals and count the amount of data allocated in each interval. Mark energy intervals with zero data as empty intervals, and cluster consecutively occurring empty intervals in time sequence into a set of consecutive empty intervals. Search forward for the nearest non-empty interval in the energy interval arrangement order as the preceding non-empty interval, and search backward for the nearest non-empty interval as the following non-empty interval.

[0060] Step S702: Obtain the preceding current characteristic value and preceding voltage characteristic value corresponding to the preceding non-empty interval, and the following current characteristic value and following voltage characteristic value corresponding to the following non-empty interval. Read the current characteristic value of the preceding non-empty interval as the preceding current characteristic value and the voltage characteristic value as the preceding voltage characteristic value, and read the current characteristic value of the following non-empty interval as the following current characteristic value and the voltage characteristic value as the following voltage characteristic value.

[0061] Step S703: Calculate the number of empty intervals between the preceding non-empty interval and the following non-empty interval. Count the number of consecutive empty intervals between the preceding and following non-empty intervals.

[0062] Step S704: Obtain the first time node when the preceding current characteristic value is generated and the second time node when the following current characteristic value is generated, and calculate the reciprocal of the time difference between the second time node and the first time node as the energy change rate weight. Obtain the first time node when the preceding current characteristic value is generated and the second time node when the following current characteristic value is generated, and calculate the reciprocal of the time difference between them as the energy change rate weight. The smaller the time difference, the larger the energy change rate weight, indicating a more rapid transition between the preceding and following intervals.

[0063] Step S705: Determine the compensation factor based on the number of empty intervals and the weight of the energy change rate. The compensation factor is determined according to a preset compensation mapping relationship based on the number of empty intervals and the weight of the energy change rate. When the weight of the energy change rate is large, the compensation factor makes the filled data biased towards uniform interpolation; when the weight of the energy change rate is small, the compensation factor makes the filled data retain more preceding or subsequent features.

[0064] Step S706: Based on the compensation factor, determine the third current characteristic value data to be used for filling the gaps between the preceding and following current characteristic values. Using the compensation factor, interpolation is performed between the preceding and following current characteristic values ​​to generate a set of current characteristic value filling data equal in number to the number of empty intervals.

[0065] Step S707: Determine the third voltage feature value data to be used for filling the preceding and following voltage feature values ​​based on the compensation factor. In the same manner, interpolation between the preceding and following voltage feature values ​​is performed using the compensation factor to generate a corresponding number of voltage feature value filling data.

[0066] Step S708: The third current characteristic value data and the third voltage characteristic value data are sequentially written into the corresponding empty intervals in the continuous empty interval set. The generated current characteristic value filling data and voltage characteristic value filling data are sequentially filled into each empty interval. After filling, the sequence has valid characteristic values ​​at all energy interval positions, and the sequence length is consistent with the standard template.

[0067] The above technical solution addresses gaps caused by missing data by using interpolation to fill in these gaps using the feature values ​​of adjacent non-empty gaps, ensuring the sequence maintains the same length as the standard template. If gaps are skipped directly, resulting in a shortened sequence, the index positions between the sequence and the standard template will shift, leading to incorrect alignments for all subsequent gaps. Interpolation ensures consistent indexing across position-by-position alignments, while the introduction of energy change rate weights allows the filling strategy to reflect the actual rate of energy transition.

[0068] In some embodiments, the method further includes: Step S801: Calculate the sum of the first historical absolute differences between the current sequence under each historical energy coordinate and the corresponding element of the current reference data. For each qualified welding process, calculate the sum of the absolute differences between the current sequence under its historical energy coordinate and the current reference data at each index position.

[0069] Step S802: Calculate the second historical absolute difference between the voltage sequence at each historical energy coordinate and the corresponding element of the voltage reference data. For each successful welding process, calculate the sum of the absolute differences between the voltage sequence at each index position and the voltage reference data at the historical energy coordinate.

[0070] Step S803: Calculate the sum of the values ​​of all elements in the current reference data to generate a current reference value, and calculate the sum of the values ​​of all elements in the voltage reference data to generate a voltage reference value. The current reference value is obtained by summing the values ​​of all elements in the current reference data, and the voltage reference value is obtained by summing the values ​​of all elements in the voltage reference data.

[0071] Step S804: Determine the relative current error value based on the first historical absolute difference and the current reference value. Divide the first historical absolute difference of each qualified welding process by the current reference value to obtain the relative current error value of that welding.

[0072] Step S805: Determine the voltage relative error value based on the second historical absolute difference and the voltage reference value. Divide the second historical absolute difference of each qualified welding process by the voltage reference value to obtain the voltage relative error value of that welding process.

[0073] Step S806: Determine the historical comprehensive error based on the relative error values ​​of the current and voltage belonging to the same historical welding process. For each qualified welding process, add the relative error values ​​of the current and voltage to obtain the historical comprehensive error of that welding process.

[0074] Step S807: Arrange all the historical comprehensive errors in ascending order of their numerical values ​​to form error distribution data. Arrange the historical comprehensive errors of all qualified welding processes in ascending order of their numerical values.

[0075] Step S808: Obtain the median error and the upper quartile error from the error distribution data. The median error and the upper quartile error are obtained from the error distribution data. The median error indicates that the overall error of half of the qualified welding processes is lower than this value, and the upper quartile error indicates that the overall error of three-quarters of the qualified welding processes is lower than this value.

[0076] Step S809: Determine the error margin based on the upper quartile error value and the median error value. The difference between the upper quartile error value and the median error value is used as the error margin.

[0077] Step S810: Determine the maximum permissible deviation threshold based on the median error value and the error margin. Add a preset multiple of the error margin to the median error value to obtain the maximum permissible deviation threshold. Using the median plus margin method to determine the threshold can resist the influence of occasional deviations in individual qualified welding processes on the threshold.

[0078] The above technical solution determines the maximum permissible deviation threshold based on the statistical results of error distribution from historical qualified welding processes, rather than a fixed empirical value set manually. Under different welding processes, materials, and equipment conditions, the deviation level between the qualified welding waveform and the standard template varies. A fixed threshold would need to be calibrated separately for each scenario and would be affected by the selection of calibration samples. By utilizing the quartile statistical characteristics of the inherent error of the qualified welding process, the threshold is determined, allowing it to automatically adapt to the normal fluctuation range of a specific welding process. Simultaneously, a reasonable tolerance space for normal fluctuations in qualified welding is reserved by setting the median plus a margin.

[0079] In some embodiments, the method further includes: Step S901: Determine the first dot product value based on the corresponding position elements of the current sequence under the energy coordinates and the current reference data. Multiply each element of the current sequence by the corresponding position element of the current reference data one by one and then sum them to obtain the first dot product value.

[0080] Step S902: Determine the first denominator value based on the magnitude of the current sequence under the energy coordinates and the magnitude of the current reference data. Calculate the square root of the sum of the squares of each element in the current sequence as the magnitude of the current sequence, calculate the square root of the sum of the squares of each element in the current reference data as the magnitude of the current reference data, and multiply the two to obtain the first denominator value.

[0081] Step S903: Determine the first cosine similarity based on the first dot product value and the first denominator value. Divide the first dot product value by the first denominator value to obtain the first cosine similarity; the cosine similarity is between 0 and 1, and the closer it is to 1, the more similar the shapes of the two sequences are.

[0082] Step S904: Process the voltage sequence under the energy coordinates and the voltage reference data using the same steps as generating the first cosine similarity to determine the second cosine similarity. Repeat steps S901 to S903 for the voltage sequence and the voltage reference data to obtain the second cosine similarity.

[0083] Step S905: Determine the minimum value between the first cosine similarity and the second cosine similarity as the waveform similarity index. The smaller value between the first and second cosine similarities is taken as the waveform similarity index. This smaller value strategy ensures that the waveform similarity index decreases significantly when any sequence of current or voltage shows obvious anomalies in shape.

[0084] Step S906: When the waveform similarity index is less than a preset shape threshold, the quality assessment result is set to zero. The waveform similarity index is compared with the preset shape threshold. The shape threshold is the lowest cosine similarity limit for determining the acceptable waveform shape. If the waveform similarity index is lower than the shape threshold, it indicates a fundamental abnormality in the waveform shape, and the quality assessment result is directly set to zero, without further positional deviation scoring.

[0085] The above technical solution introduces cosine similarity as a global supplementary criterion for waveform shape. Position-by-position error accumulation focuses on the degree of deviation of the sequence from the reference value at each energy interval. If the overall upward and downward trend of the waveform differs fundamentally from the standard template, even if the deviation at each position is small, position-by-position error accumulation may not trigger an excessively large overall error value. Cosine similarity measures the similarity of the overall shape of two sequences and is sensitive to morphological features such as upward and downward trends and the relationship between peaks and troughs. When a fundamental anomaly occurs in the waveform shape, the cosine similarity decreases significantly, and a shape threshold is used to directly determine non-compliance, thus compensating for the shortcomings of position-by-position error accumulation in capturing overall waveform morphological anomalies.

[0086] In some embodiments, before determining the instantaneous power value based on the current data and the voltage data at corresponding time points, the method further includes: Step S1001: Obtain the preset background current threshold. Read the preset background current threshold. The background current threshold is the current boundary value used to distinguish between the welding in progress state and the welding stopped state. When the welding power supply has stopped outputting but the sensor continues to collect data, there may be a small leakage current or induced current in the circuit.

[0087] Step S1002: Assign zero to the current data whose values ​​are less than the background current threshold. Iterate through all current data and assign zero to any current data whose values ​​are less than the background current threshold. The instantaneous power value corresponding to the current data assigned zero is also zero, and it does not contribute energy in subsequent energy integration.

[0088] Step S1003: When the current data is continuously assigned a value of zero for a preset time length, the tail data block of the current data is truncated. When the duration of the current data continuously assigned to zero exceeds a preset time threshold, the data after that time point is determined to be an invalid post-weld data block, and the data at that time point and after it is truncated and discarded from the current data sequence and voltage data sequence, retaining only the valid data during the welding process.

[0089] The above technical solution performs background current threshold filtering and tail-end truncation preprocessing on the data before energy integration. After welding, if the sensor continues to collect data at a set frequency, it will record zero or near-zero invalid data after the welding power is turned off. If this data participates in energy integration, it will cause the total welding energy value to be injected into the zero-power interval of the invalid segment, making the division of the energy interval include the post-weld no-data collection period. This results in the effective energy interval being compressed and the invalid energy interval occupying the tail of the sequence, thus causing a systematic deviation in the comparison with the standard template. By identifying the background current threshold and truncating the tail data when it is continuously zero, it is ensured that the data participating in energy integration and template comparison comes entirely from the welding stage.

[0090] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.

Claims

1. A real-time welding quality assessment method based on current and voltage waveform template matching, characterized in that, include: Obtain current and voltage data for the welding process to be evaluated; The instantaneous power value is determined based on each current data point in the current data and the voltage value at the corresponding time node in the voltage data; The total welding energy value is obtained by accumulating and integrating the instantaneous power value at corresponding time intervals, and then the total welding energy value is divided into multiple equally divided energy intervals. The instantaneous power values ​​are accumulated according to the chronological order of the time nodes to determine the cumulative energy value corresponding to each time node; Based on the accumulated energy value, the current data and voltage value at the corresponding time node are divided into the corresponding energy range; Among all the current data and all the voltage values ​​that are divided into the same equal energy interval, the corresponding current characteristic value and voltage characteristic value are determined respectively. Based on the arrangement order of the energy range, the determined current characteristic values ​​and voltage characteristic values ​​are arranged in order to generate the current sequence and voltage sequence in the energy coordinate. The current sequence and voltage sequence under the energy coordinates are compared with a preset standard energy coordinate template to determine the quality assessment result of the welding process to be evaluated.

2. The method according to claim 1, characterized in that, Among all the current data and all the voltage values ​​divided into the same equally divided energy interval, the corresponding current characteristic value and voltage characteristic value are determined respectively, including: Within each of the equally divided energy intervals, all the current data and voltage values ​​contained therein are divided into multiple time windows of equal length according to the corresponding time node sequence. The average value of all current data within each time window is calculated to generate the average current value, and the average value of all voltage values ​​is calculated to generate the average voltage value. Determine the maximum mean value among the current mean values ​​corresponding to all the time windows; The maximum current value contained within the first time window that generates the maximum average value is taken as the current characteristic value. Determine the minimum mean among the voltage mean values ​​corresponding to all the time windows; The minimum voltage value contained within the second time window that generates the minimum mean is taken as the voltage characteristic value.

3. The method according to claim 2, characterized in that, The maximum current value contained within the first time window that generates the maximum average value is used as the current characteristic value, including: Within the first time window, identify the candidate feature value with the largest value and locate the time node corresponding to the candidate feature value to generate a candidate time node; Based on the candidate time nodes, the preceding current data at the position adjacent to the candidate time node and the following current data at the position adjacent to the candidate time node are obtained within the first time window. The difference between the candidate feature value and the preceding current data is calculated to determine the leading edge difference, and the difference between the candidate feature value and the following current data is calculated to determine the trailing edge difference; The jump value is determined based on the difference between the leading edge and the trailing edge; When the jump value is greater than a preset continuity threshold, the candidate feature value is determined to be an interference value and the interference value is removed from the first time window; Repeat the step of identifying the candidate feature value with the largest value until the jump value corresponding to the newly identified candidate feature value is not greater than the continuity threshold. The candidate feature values ​​that satisfy the condition that the jump value is not greater than the continuity threshold are used as the current feature values.

4. The method according to claim 3, characterized in that, The preset standard energy coordinate template is generated in advance based on the following steps: Acquire multiple qualified current data and multiple qualified voltage data corresponding to multiple welding processes that were in a qualified state in history; Calculate the current sequence and voltage sequence under multiple historical energy coordinates for each qualified current data and the corresponding qualified voltage data; Multiple current feature values ​​of the current sequence under all the historical energy coordinates are obtained at the index position of the same equally divided energy interval, and multiple voltage feature values ​​of the voltage sequence under all the historical energy coordinates are obtained at the index position of the same equally divided energy interval. The first median value of the plurality of current characteristic values ​​is determined as the current reference data of the standard energy coordinate template at that index position; The second median value of the plurality of voltage characteristic values ​​is determined as the voltage reference data of the standard energy coordinate template at that index position.

5. The method according to claim 4, characterized in that, Determining the quality assessment result of the welding process to be evaluated includes: Under the same arrangement order of the equally divided energy intervals, obtain the first absolute difference between the current sequence under the energy coordinates and the corresponding position element of the current reference data, and the second absolute difference between the voltage sequence under the energy coordinates and the corresponding position element of the voltage reference data. A first relative difference is determined based on the first absolute difference and the current reference data, and a second relative difference is determined based on the second absolute difference and the voltage reference data; The cross-power error is determined by multiplying the first relative difference and the second relative difference within the same equally divided energy range; The cross power deviation is determined based on the cumulative cross power error generated by traversing all the equally divided energy intervals; The basic error value is determined based on the sum of all the first relative differences and the sum of all the second relative differences; The current comprehensive error value is determined based on the preset first error weighting coefficient and the basic error value, and the preset second error weighting coefficient and the cross power deviation, respectively. The overall error ratio is determined based on the current overall error value and the maximum permissible deviation threshold. When the overall error ratio is less than or equal to a preset first benchmark value, a scoring coefficient is determined based on the first benchmark value and the overall error ratio, and a quality deviation score is determined based on the scoring coefficient and a preset full score value as the quality assessment result.

6. The method according to claim 5, characterized in that, The basic error value is determined based on the sum of all the first relative differences and the sum of all the second relative differences, including: Reference gradient data is determined based on the numerical difference between elements at adjacent index positions in the current reference data; Identify positive abrupt change locations in the reference gradient data where the value is greater than a first preset gradient threshold, and negative abrupt change locations where the value is less than a second preset gradient threshold; Based on the positive and negative mutation positions, the multiple equally divided energy intervals are divided into an arc-starting interval at the beginning, an arc-ending interval at the end, and a stable arc interval in the middle. Obtain the absolute value of each reference gradient belonging to the arc initiation interval and the arc termination interval, and determine the interval weight corresponding to each energy interval based on the absolute value and the preset conversion coefficient; The boundary weighted error is determined based on the first relative difference and the second relative difference belonging to the arc initiation interval and the arc termination interval, and the interval weight of the corresponding energy interval. The weighted steady-state error is determined based on the first relative difference and the second relative difference belonging to the steady-arc interval and the preset steady-state weight. The basic error value is determined based on all the boundary weighted errors and the weighted steady-state error.

7. The method according to claim 6, characterized in that, Before generating the current sequence and voltage sequence in energy coordinates by sequentially arranging the determined current and voltage characteristic values ​​based on the arrangement order of the equally divided energy intervals, the method further includes: In the plurality of equally divided energy intervals, a set of consecutive empty intervals containing zero elements is retrieved, and the preceding and following non-empty intervals adjacent to the set of consecutive empty intervals are located. Obtain the preceding current characteristic value and preceding voltage characteristic value corresponding to the preceding non-empty interval, and the following current characteristic value and following voltage characteristic value corresponding to the following non-empty interval; Calculate the number of empty intervals between the preceding non-empty interval and the following non-empty interval; Obtain the first time node that generates the preceding current characteristic value and the second time node that generates the subsequent current characteristic value, and calculate the reciprocal of the time difference between the second time node and the first time node as the energy change rate weight. The compensation factor is determined based on the number of empty intervals and the weight of the energy change rate. Based on the compensation factor, a third current characteristic value data for filling is determined for the preceding current characteristic value and the following current characteristic value; Based on the compensation factor, a third voltage feature value data for filling is determined for the preceding voltage feature value and the following voltage feature value; The third current characteristic value data and the third voltage characteristic value data are sequentially written into the corresponding empty intervals in the set of continuous empty intervals.

8. The method according to claim 7, characterized in that, The method further includes: Calculate the sum of the first historical absolute differences between the current sequence at each historical energy coordinate and the corresponding position element of the current reference data; Calculate the sum of the second historical absolute differences between the voltage sequence at each historical energy coordinate and the corresponding position element of the voltage reference data; The sum of the values ​​of all elements in the current reference data is calculated to generate the current reference value, and the sum of the values ​​of all elements in the voltage reference data is calculated to generate the voltage reference value. The relative error value of the current is determined based on the first historical absolute difference and the current reference value; The voltage relative error value is determined based on the second historical absolute difference and the voltage reference value; The historical comprehensive error is determined based on the relative error values ​​of the current and the relative error values ​​of the voltage, which belong to the same historical welding process. All the historical composite errors are arranged in ascending order of their numerical values ​​to form error distribution data; Obtain the median error and the upper quartile error from the error distribution data; The error margin is determined based on the upper quartile error value and the median error value; The maximum permissible deviation threshold is determined based on the median error value and the error margin.

9. The method according to claim 8, characterized in that, The method further includes: The first dot product value is determined based on the elements of the current sequence under the energy coordinates and the corresponding position elements of the current reference data. The first denominator value is determined based on the magnitude of the current sequence under the energy coordinates and the magnitude of the current reference data; The first cosine similarity is determined based on the first dot product value and the first denominator value; The voltage sequence under the energy coordinates and the voltage reference data are processed using the same steps as those used to generate the first cosine similarity to determine the second cosine similarity; The smallest value between the first cosine similarity and the second cosine similarity is determined as the waveform similarity index; When the waveform similarity index is less than a preset shape threshold, the quality assessment result is assigned a value of zero.

10. The method according to claim 9, characterized in that, Before determining the instantaneous power value based on the current data and voltage data at corresponding time points, the method further includes: Obtain the preset background current threshold; The current data whose values ​​are less than the background current threshold are assigned a value of zero; When the current data has been continuously set to zero for a preset time period, the tail data block of the current data is truncated.