Electrochemical machining short circuit prediction method and system

CN122913589APending Publication Date: 2026-10-16GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611236318.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

硬编码标签导致小样本训练泛化度低:深度学习及机器学习算法在工业应用中极度依赖准确的“短路先兆”标签,现有方案大多采取在屋里短路停机时刻“向前硬编码回溯固定N个周期”的方法,但由于实际工业加工中不同工件、不同工艺流场、不同阶段的加工时长与平均基础电流均存在固有差异,采用固定窗口打标会将正常波形误标为退化波形,严重污染训练集,降低模型的预测时效性和准确性;

Benefits of technology

本发明与现有技术相比,对采集电解加工过程中的电压数据和电流数据进行校验和预处理,得到纯净脉冲电解加工短路退化数据集;在纯净脉冲电解加工短路退化数据集中截取基准平稳运行区,并计算基准平稳运行区内所有平稳周期的最大脉冲电流的平均值和标准差;对基准平稳运行区的终点位置到纯净脉冲电解加工短路退化数据集中最后一个数据之间的最大脉冲电流进行时序平滑,得到平滑峰值序列;利用最大脉冲电流的平均值和标准差制定边界阈值,并基于平滑峰值序列和边界阈值对纯净脉冲电解加工短路退化数据集进行分类打标,得到打标结果;基于打标结果对纯净脉冲电解加工短路退化数据集进行重采样,得到非对称重采样结果,并利用非对称重采样结果对机器学习模型进行训练,得到短路预测模型;将纯净脉冲电解加工短路退化数据集输入短路预测模型进行短路预测,得到状态绝对概率值,从而提高短路预测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122913589A_ABST
    Figure CN122913589A_ABST
Patent Text Reader

Abstract

The application provides an electrolytic machining short circuit prediction method and system, which verifies and preprocesses voltage data and current data in an electrolytic machining process to obtain a pure pulse electrolytic machining short circuit degradation data set; a reference smooth running area is intercepted in the pure pulse electrolytic machining short circuit degradation data set; the maximum pulse current between the end position of the reference smooth running area and the last data in the pure pulse electrolytic machining short circuit degradation data set is time-series smoothed, and then the pure pulse electrolytic machining short circuit degradation data set is classified and labeled to obtain a labeling result; the pure pulse electrolytic machining short circuit degradation data set is resampled to obtain an asymmetric resampling result; a machine learning model is trained to obtain a short circuit prediction model; the pure pulse electrolytic machining short circuit degradation data set is input into the short circuit prediction model for short circuit prediction to obtain a state absolute probability value, thereby improving short circuit prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrolytic machining control and detection technology, and in particular to a method and system for predicting short circuits in electrolytic machining. Background Technology

[0002] Electrolytic machining removes material through anodic dissolution. The flow field gap between the tool electrode and the workpiece is typically maintained at 10-100 mm. The particles are extremely small. The processing involves high-frequency pulsed current, high-speed electrolyte circulation, and the discharge of byproducts (such as hydrogen bubbles and metal shavings). Existing edge detection protection solutions have the following serious drawbacks: Hard-coded labels lead to low generalization in small sample training: Deep learning and machine learning algorithms rely heavily on accurate "short circuit precursor" labels in industrial applications. Most existing solutions adopt the method of "hard-coding back a fixed N cycles" at the moment of short circuit shutdown in the room. However, due to the inherent differences in processing time and average base current of different workpieces, different process flow fields, and different stages in actual industrial processing, using fixed window labeling will mislabel normal waveforms as degenerate waveforms, seriously polluting the training set and reducing the prediction timeliness and accuracy of the model. Limited resources at the edge and numerous model prediction glitches: Under medium-to-high frequency pulse power supply conditions (e.g., f=20kHz, period of 50mus), traditional deep learning networks cannot be directly deployed inside the MCU due to their high computational cost. Even after the model is simplified and compressed and deployed at the edge, it is prone to exceeding the single-frame prediction probability limit when faced with instantaneous flow field pulse glitches. This causes frequent erroneous braking interruptions due to single-point noise, making it impossible to guarantee the continuity of processing.

[0003] Currently available short-circuit detection patents include those that monitor the inter-pulse voltage between the tool electrode and the workpiece using an oscilloscope. When the voltage drops to zero, a short circuit is detected, and the power supply is immediately cut off and the workpiece is retracted. However, this only triggers protection after a short circuit occurs and cannot prevent damage. Furthermore, the time-consuming mechanical retraction cannot handle low-to-medium frequency PWM conditions. Through-hole short-circuit protection patents are applied during the through-hole penetration stage of electrolytic machining, which is not applicable to conventional planar / curved surface machining and relies on current drop as a post-event criterion, failing to achieve risk prediction. Some embedded edge detection systems deploy lightweight models to embedded platforms to achieve real-time defect detection or image recognition. This verifies the feasibility of edge computing in industrial real-time scenarios, and model compression technology can also adapt to resource-constrained devices. However, they are not optimized for electrolytic machining timing signals. Most existing solutions process image data, while electrolytic machining requires real-time analysis of timing signals. Existing embedded AI systems have response delays in the millisecond range, which cannot meet the protection requirements of PWM cycle-level protection. Summary of the Invention

[0004] This invention provides a method and system for predicting short circuits in electrolytic machining, with the aim of improving the accuracy of short circuit prediction.

[0005] To achieve the above objectives, the present invention provides a method for predicting short circuits in electrolytic machining, comprising: Step 1: Collect voltage and current signals during the electrolytic processing to obtain voltage and current data; Step 2: Verify and preprocess the voltage and current data to obtain a clean pulse electrolytic machining short-circuit degradation dataset; Step 3: Extract the benchmark stable operating region from the pure pulse electrolytic machining short-circuit degradation dataset, and calculate the average value and standard deviation of the maximum pulse current of all stable cycles within the benchmark stable operating region; Step 4: Perform time-series smoothing on the maximum pulse current between the end point of the benchmark stable operating region and the last data in the pure pulse electrolytic machining short-circuit degradation dataset to obtain a smoothed peak sequence; Step 5: Use the average value and standard deviation of the maximum pulse current to determine the boundary threshold, and classify and label the pure pulse electrolytic machining short-circuit degradation dataset based on the smooth peak sequence and the boundary threshold to obtain the labeling results; Step 6: Based on the labeling results, resample the pure pulse electrolytic machining short-circuit degradation dataset to obtain asymmetric resampling results, and use the asymmetric resampling results to train the machine learning model to obtain the short-circuit prediction model. Step 7: Input the pure pulse electrolytic machining short-circuit degradation dataset into the short-circuit prediction model to predict the short circuit and obtain the absolute probability value of the state.

[0006] Furthermore, step 2 includes: A frequency reduction sampling snapshot mechanism is used to print voltage and current data via serial port, and the serial port printing results are obtained. Based on the serial port printing results, the sampling trigger phase of voltage and current data is adjusted to obtain the adjusted data. The adjusted data is subjected to a linear physical transformation to obtain the actual current value and the actual voltage value; Find the sampling point in the actual current value that corresponds to the global maximum peak current of the entire processing process, and delete the actual current value after the sampling point to obtain the effective current value; The effective current value is classified based on the set discrimination threshold, and the classification results are obtained. The classification results include normal processing section, pre-short circuit precursor section, and confirmed short circuit section. The classification results were cleaned to obtain a clean pulse electrolytic machining short-circuit degradation dataset.

[0007] Furthermore, the classification results are cleaned to obtain a clean pulse electrolytic machining short-circuit degradation dataset, including: When the time interval between two pre-short circuit precursor segments or two determined short circuit segments is less than a preset threshold, the normal data between the two pre-short circuit precursor segments or two determined short circuit segments is deleted, and the two pre-short circuit precursor segments or two determined short circuit segments are merged to obtain merged pre-short circuit precursor segments and merged determined short circuit segments. Based on the macroscopic evolution curves of peak voltage and peak current throughout the entire electrolytic machining cycle, the voltage or current values ​​that are misaligned or drifted in the normal machining section are cleaned to obtain the first cleaning data. The merged pre-short circuit precursor segments are spliced ​​together according to the actual time difference calibration to obtain a complete pre-short circuit precursor segment. The voltage and current waveforms in the complete pre-short circuit precursor segment are mapped to the same coordinate axis for in-situ multi-frame overlapping topology drawing to obtain the abnormal stage stitched superimposed curve. In the abnormal stage stitched superimposed curve, atypical interference groups of hydrogen evolution were identified and eliminated to obtain the second cleaning data; Based on the merged data within the determined short-circuit segment, the first cleaning data, and the second cleaning data, a pure pulse electrolytic machining short-circuit degradation dataset is obtained.

[0008] Furthermore, the expression for smoothing a peak sequence is: ; ; in, Indicates a smooth peak sequence. Indicates the first Smooth peak current of each cycle, Indicates the number of periods. Indicates the maximum pulse current. Indicates the first One cycle, This represents the offset of the sliding window.

[0009] Furthermore, the boundary thresholds include a first boundary threshold and a second boundary threshold; The pure pulse electrolytic machining short-circuit degradation dataset was classified and labeled based on smoothed peak sequences and boundary thresholds, yielding the following labeling results: In the pure pulse electrolytic machining short-circuit degradation dataset, data where the smoothed peak current of three consecutive cycles in the smoothed peak sequence is less than the first boundary threshold are selected, i.e., when... , At that time, hour The data before the corresponding sampling point is divided into a normal processing area, and all data in this normal processing area is labeled with a health status. In the pure pulse electrolytic machining short-circuit degradation dataset, the smoothed peak sequence of the first... The smoothed peak current of the nth cycle is greater than or equal to the first boundary threshold, and the nth smoothed peak current in the sequence is... Data whose smoothed peak current is less than the second boundary threshold and whose maximum peak current is less than the preset absolute hard threshold in each cycle are classified as mildly degraded areas, and all data in these mildly degraded areas are marked with a warning label. In the pure pulse electrolytic machining short-circuit degradation dataset, the smoothed peak sequence of the first... Data with a smooth peak current greater than or equal to the second boundary threshold or a maximum peak current greater than or equal to a preset absolute hard threshold in a given cycle are classified as danger zones, and all data in these danger zones are labeled with a danger tag.

[0010] Furthermore, based on the labeling results, the pure pulse electrolytic machining short-circuit degradation dataset is resampled to obtain asymmetric resampling results, including: Based on the set sample size and bidirectional clamping line, the data in the danger zone are expanded to obtain danger-expanded data; Setting a hard capping interception resamples the data in the slightly degraded area to obtain slightly degraded data that meets the quantity requirements; Based on the total sample size of the hazardous expansion data and the mild degradation data, the target number of samples in the normal processing area is dynamically calculated, and resampling is performed in the normal processing area with a fixed step size to obtain the normal data of the target number of samples. The asymmetric resampling results are composed of dangerous augmented data, mildly degraded data that meets the quantity requirements, and normal data with the target sample size.

[0011] Furthermore, training machine learning models using asymmetric resampling results includes: The classification decision tree is trained using the results of asymmetric resampling; The peak-preserving neural network model was trained using the current data from the asymmetric resampling results.

[0012] Furthermore, training the classification decision tree using asymmetric resampling results includes: Feature extraction was performed on the asymmetric resampling results to obtain 11-dimensional features; The 11-dimensional features are normalized to obtain the normalized 11-dimensional features; The classification decision tree is initially trained using the normalized 11-dimensional features, resulting in the initial training classification decision tree and the global contribution rate of each feature. Based on the global contribution rate of each feature, the six features with the highest global contribution rate are selected to perform secondary training on the initially trained classification decision tree, resulting in the trained classification decision tree.

[0013] Furthermore, the peak-preserving neural network model includes a first convolutional layer, a first max pooling layer, a second convolutional layer, a second max pooling layer, a global average pooling layer, a first fully connected layer, and a second fully connected layer connected in sequence. The input of the first convolutional layer is used to receive the current data from the asymmetric resampling results; The second fully connected layer is used to output the absolute probability value of the state.

[0014] This invention also provides an electrolytic machining short-circuit prediction system, which applies an electrolytic machining short-circuit prediction method. The electrolytic machining short-circuit prediction system includes: The acquisition module is used to acquire voltage and current signals during the electrolytic processing to obtain voltage and current data. The verification module is used to verify and preprocess voltage and current data to obtain a clean pulse electrolytic machining short-circuit degradation dataset. The calculation module is used to extract the benchmark stable operating region from the pure pulse electrolytic machining short-circuit degradation dataset and calculate the average and standard deviation of the maximum pulse current of all stable cycles within the benchmark stable operating region; The smoothing module is used to perform time-series smoothing of the maximum pulse current between the end position of the reference stable operating region and the last data in the pure pulse electrolytic machining short-circuit degradation dataset, to obtain a smoothed peak sequence. The labeling module is used to determine the boundary threshold using the average value and standard deviation of the maximum pulse current, and to classify and label the pure pulse electrolytic short-circuit degradation dataset based on the smooth peak sequence and the boundary threshold to obtain the labeling results; The resampling module is used to resample the pure pulse electrolytic machining short-circuit degradation dataset based on the labeling results to obtain asymmetric resampling results. The asymmetric resampling results are then used to train the machine learning model to obtain a short-circuit prediction model. The short-circuit prediction module is used to input the pure pulse electrolytic machining short-circuit degradation dataset into the short-circuit prediction model to predict the short circuit and obtain the absolute probability value of the state.

[0015] The above-described solution of the present invention has the following beneficial effects: Compared with existing technologies, this invention verifies and preprocesses voltage and current data collected during electrolytic machining to obtain a pure pulse electrolytic machining short-circuit degradation dataset. A benchmark stable operating region is extracted from this dataset, and the average and standard deviation of the maximum pulse current for all stable cycles within that region are calculated. The maximum pulse current between the endpoint of the benchmark stable operating region and the last data point in the pure pulse electrolytic machining short-circuit degradation dataset is time-series smoothed to obtain a smoothed peak sequence. Boundary thresholds are established using the average and standard deviation of the maximum pulse currents, and the pure pulse electrolytic machining short-circuit degradation dataset is classified and labeled based on the smoothed peak sequence and boundary thresholds to obtain labeling results. The dataset is resampled based on the labeling results to obtain asymmetric resampling results, which are then used to train a machine learning model to obtain a short-circuit prediction model. Finally, the pure pulse electrolytic machining short-circuit degradation dataset is input into the short-circuit prediction model to predict short circuits and obtain absolute probability values ​​of the states, thereby improving the accuracy of short-circuit prediction.

[0016] Other beneficial effects of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of the present invention; Figure 2 This is a schematic diagram of the electrolytic machining short-circuit prediction system in an embodiment of the present invention. Detailed Implementation

[0018] To make the technical problems, solutions, and advantages of this invention clearer, a detailed description will be provided below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0019] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a locking connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0021] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0022] This invention addresses existing problems by providing a method and system for predicting short circuits in electrolytic machining.

[0023] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting short circuits in electrolytic machining, comprising: Step 1: Collect voltage and current signals during the electrolytic processing to obtain voltage and current data; Step 2: Verify and preprocess the voltage and current data to obtain a clean pulse electrolytic machining short-circuit degradation dataset; Step 3: Extract the benchmark stable operating region from the pure pulse electrolytic machining short-circuit degradation dataset, and calculate the average value and standard deviation of the maximum pulse current of all stable cycles within the benchmark stable operating region; Step 4: Perform time-series smoothing on the maximum pulse current between the end point of the benchmark stable operating region and the last data in the pure pulse electrolytic machining short-circuit degradation dataset to obtain a smoothed peak sequence; Step 5: Use the average value and standard deviation of the maximum pulse current to determine the boundary threshold, and classify and label the pure pulse electrolytic machining short-circuit degradation dataset based on the smooth peak sequence and the boundary threshold to obtain the labeling results; Step 6: Based on the labeling results, resample the pure pulse electrolytic machining short-circuit degradation dataset to obtain asymmetric resampling results, and use the asymmetric resampling results to train the machine learning model to obtain the short-circuit prediction model. Step 7: Input the pure pulse electrolytic machining short-circuit degradation dataset into the short-circuit prediction model to predict the short circuit and obtain the absolute probability value of the state.

[0024] In this embodiment of the invention, current and voltage signals are acquired through a Hall sensor. Two ADCs synchronously acquire voltage and current signals in the Hall sensor at a high frequency of 480kHz, and multiple sets of voltage data and multiple sets of current data are obtained by taking 12 high-level sampling points and 12 low-level sampling points as a set of data.

[0025] Specifically, step 2 includes: A frequency reduction sampling snapshot mechanism is used to print voltage and current data via serial port, and the serial port printing results are obtained. Based on the serial port printing results, the sampling trigger phase of voltage and current data is adjusted to obtain the adjusted data. The adjusted data is subjected to a linear physical transformation to obtain the actual current value and the actual voltage value; Find the sampling point in the actual current value that corresponds to the global maximum peak current of the entire processing process, and delete the actual current value after the sampling point to obtain the effective current value; The effective current value is classified based on the set discrimination threshold, and the classification results are obtained. The classification results include normal processing section, pre-short circuit precursor section, and confirmed short circuit section. The classification results were cleaned to obtain a clean pulse electrolytic machining short-circuit degradation dataset.

[0026] Because the data flow rate is extremely fast under high-frequency sampling, the serial port cannot print the full data. Therefore, a frequency reduction sampling snapshot mechanism is adopted (for example, only the first group is sampled for every 50 data points) to print the first group of voltage and current data via serial port. The serial port printing structure allows for intuitive observation and adjustment of the data sampling trigger phase, ensuring that the boundary of the acquisition window is exactly aligned with the rising and falling edges of the signal, thus avoiding feature extraction failure caused by sampling misalignment across cycles.

[0027] In this embodiment of the invention, since the adjusted data is binary file data, it is necessary to perform a linear physical transformation on the binary file data to obtain the actual current value and the actual voltage value. The transformation expression is as follows: ; in, Indicates the actual voltage value. This represents the voltage data obtained from the original sampling. This represents the full-scale digital threshold of a 12-bit unipolar ADC. This represents the reference voltage of the ADC. This represents the restoration coefficient of the voltage divider circuit during electrolytic machining. The calculation logic of this voltage conversion formula is as follows: First, the original voltage data is normalized to obtain a ratio value between 0 and 1, which is used to characterize the proportion of the current sampled voltage to the full scale of the ADC. Then, the ratio value is multiplied by the ADC's reference voltage to obtain the actual input voltage of the ADC. Finally, the actual electrolytic machining voltage value before voltage division is derived based on the voltage division ratio. ; ; in, This represents the actual current value. This represents the current data obtained from the original sampling. This represents the nominal half-range scale value of the 12-bit ADC in differential mode, with a value equal to 2. The current conversion formula, which represents the sensitivity of the current sensor, is calculated as follows: the original sampled current data is normalized to the nominal half-range with a ratio of 0 to 1, which is used to characterize the proportion of the current to the positive full-range. Then, the normalized ratio is converted into the actual current at the input of the ADC, which is the induced current output by the Hall sensor. Finally, the induced current is converted into the actual current value based on the sensitivity of the Hall sensor.

[0028] In this embodiment of the invention, the set judgment thresholds are normal reference, current rise threshold RISING=4.5A, and short circuit threshold SHORT=9.0A.

[0029] Specifically, the classification results are cleaned to obtain a clean pulse electrolytic machining short-circuit degradation dataset, including: When the time interval between two pre-short circuit precursor segments or two determined short circuit segments is less than a preset threshold, the normal data between the two pre-short circuit precursor segments or two determined short circuit segments is deleted, and the two pre-short circuit precursor segments or two determined short circuit segments are merged to obtain merged pre-short circuit precursor segments and merged determined short circuit segments. Based on the macroscopic evolution curves of peak voltage and peak current throughout the entire electrolytic machining cycle, the voltage or current values ​​that are misaligned or drifted in the normal machining section are cleaned to obtain the first cleaning data. The merged pre-short circuit precursor segments are spliced ​​together according to the actual time difference calibration to obtain a complete pre-short circuit precursor segment. The voltage and current waveforms in the complete pre-short circuit precursor segment are mapped to the same coordinate axis for in-situ multi-frame overlapping topology drawing to obtain the abnormal stage stitched superimposed curve. In the abnormal stage stitched superimposed curve, atypical interference groups of hydrogen evolution were identified and eliminated to obtain the second cleaning data; Based on the merged data within the determined short-circuit segment, the first cleaning data, and the second cleaning data, a pure pulse electrolytic machining short-circuit degradation dataset is obtained.

[0030] In this embodiment of the invention, the preset threshold is a time interval of less than 50ms, that is, when there are less than 1000 sets of data at a frequency of 20kHz, the normal data between two pre-short circuit precursor segments or two determined short circuit segments is deleted, and the two pre-short circuit precursor segments or two determined short circuit segments are merged.

[0031] Because pulsed electrochemical machining is accompanied by intense high-frequency, high-current electrochemical reactions, hydrogen bubbles are violently precipitated on the cathode surface. When the flow rate matching of the local flow field is mismatched, the accumulated hydrogen gas cloud will cause the electrolyte in the machining gap to rise macroscopically, making large-area contact with the bottom of the tool electrode in advance. At this time, the tool and the solid metal skeleton of the workpiece do not come into mechanical contact, but the local macroscopic current will expand abnormally. This state is very easy to be mislabeled as a metal short circuit in the true mechanism, forming an atypical interference group of hydrogen evolution. Therefore, the embodiments of the present invention demonstrate the macroscopic evolution curves of peak current and peak voltage in a complete machining life cycle of several minutes. By observing the macroscopic evolution curves, the stability of the machining process is evaluated as a whole, and the rising and falling phases of a single set of data are directly verified to see if there is a serious misalignment or shift. Data with serious misalignment or shift is cleaned up to obtain the first cleaned data.

[0032] In this embodiment of the invention, the merged pre-short circuit precursor segments are spliced ​​together according to the actual time difference calibration to obtain a complete pre-short circuit precursor segment. The voltage and current waveforms within the complete pre-short circuit precursor segment are then mapped onto the same coordinate axis for in-situ multi-frame overlapping topology drawing to obtain the abnormal stage stitched superimposed curve. In the abnormal stage stitched superimposed curve, atypical interference groups of hydrogen evolution are identified and removed to obtain the second cleaning data. This step can completely strip away and remove more than 95% of the stable operation period, ensuring that the data input to the machine learning model has extremely high physical mechanism purity and avoiding generalization false alarms from the model.

[0033] Specifically, step 3 includes: Using the moment of machine failure as the endpoint, 45% to 70% of the total time axis length of each machining file is dynamically extracted from the pure pulse electrochemical machining short-circuit degradation dataset as the benchmark stable operating area for this group of electrochemical machining experiments. Read the data of all processing pulse cycles within the baseline stable operating range, and find the maximum pulse current within each stable cycle; The average value and standard deviation of the maximum pulse current in all steady cycles within the reference steady operating region are calculated using the following formula: ; ; in, This represents the average of the maximum pulse current across all stationary periods. Indicates the number of stationary periods. Indicates the first The maximum pulse current of a steady cycle This represents the standard deviation of the maximum pulse current across all stationary periods.

[0034] To eliminate random spike interference introduced by high-level glitches and random noise during high-frequency gap discharge, this embodiment of the invention performs time-series smoothing on the maximum pulse current between the end position of the reference stable operating region and the last data in the pure pulse electrolytic machining short-circuit degradation dataset, resulting in the expression for the smoothed peak sequence: ; ; in, Indicates a smooth peak sequence. Indicates the first Smooth peak current of each cycle, Indicates the number of periods. Indicates the maximum pulse current. Indicates the first One cycle, This represents the sliding window offset; when k=0, Indicates the first The maximum pulse current in each cycle, when k=1. Indicates the first The maximum pulse current of the previous cycle, when k=2. Indicates the first The maximum pulse current in the first two cycles of the cycle.

[0035] The present invention, through the above method, performs timing smoothing of the maximum pulse current, which can effectively prevent premature false alarms of the edge anti-shake layer of the processing system.

[0036] In order to enable the candidate machine learning model to have a step-by-step early warning capability, this invention sets boundary thresholds based on the average value and standard deviation of the maximum pulse current of all stable cycles within the benchmark stable operating region to classify and label the pure pulse electrolytic machining short-circuit degradation dataset. The boundary thresholds include a first boundary threshold. Second boundary threshold .

[0037] Specifically, the pure pulse electrolytic machining short-circuit degradation dataset is classified and labeled based on smoothed peak sequences and boundary thresholds, yielding the following labeling results: In the pure pulse electrolytic machining short-circuit degradation dataset, data where the smoothed peak current of three consecutive cycles in the smoothed peak sequence is less than the first boundary threshold are selected, i.e., when... , At that time, hour The data before the corresponding sampling point is divided into a normal processing area, and all data in this normal processing area is labeled with a health status. In the pure pulse electrolytic machining short-circuit degradation dataset, the smoothed peak sequence of the first... The smoothed peak current of the nth cycle is greater than or equal to the first boundary threshold, and the nth smoothed peak current in the sequence is... Data where the smoothed peak current of each cycle is less than the second boundary threshold and the maximum peak current is less than the preset absolute hard threshold, i.e., when and At that time, it was classified as a mild degradation zone. The physical manifestation of this zone is that the processing current center begins to rise in a trend, but no macroscopic transient breakdown occurs. This is a precursor to mild degradation. Therefore, all data in this mild degradation zone are marked with an early warning label. In the pure pulse electrolytic machining short-circuit degradation dataset, the smoothed peak sequence of the first... Data where the smoothed peak current of each cycle is greater than or equal to the second boundary threshold, or the maximum peak current is greater than or equal to the preset absolute hard threshold, i.e., when or When the data is in a dangerous zone, it is physically characterized by severe distortion of the smooth discharge center or violent transient punctures caused by unsmoothed current. This indicates that metal-mechanical contact or violent arc discharge is about to occur, which is a high-risk disaster state. Therefore, all data in this dangerous zone are labeled as dangerous.

[0038] In pulse electrolytic machining time-series data, the normal processing state region typically accounts for over 95% of the data, while the mild degradation and danger zones represent extremely scarce industrial samples. This severe data asymmetry leads to significant majority class false negatives in traditional models. Therefore, it is necessary to resample the pure pulse electrolytic machining short-circuit degradation dataset based on the labeling results to obtain asymmetric resampling results, including: Based on the set sample size bidirectional clamping line, the data in the danger zone is expanded to obtain danger expanded data. For example, if the number of actual short-circuit critical cycles exceeds 2000 sets, random sampling without replacement is performed to obtain the required amount of data. If the data in the danger zone is less than 50 sets, oversampling with replacement is used to flatten the data to 50 sets to ensure that the machine learning model can fully learn the characteristics of the catastrophic breakdown transient. Setting a hard capping interception resamples the data in the slightly degraded region to obtain slightly degraded data that meets the quantity requirements. For example, setting 3000 sets of hard capping interception for the data in the slightly degraded region can prevent a single set of data from excessively contributing degraded samples, which would cause a local distribution bias in the training set. Based on the total sample size of the hazardous augmentation data and the slightly degraded data, the target sample number for the normal processing area is dynamically calculated. Resampling is then performed within the normal processing area with a fixed step size to obtain the normal data for the target sample number. The expression for calculating the target sample number for the normal processing area is: ; in, This represents the target number of samples in the normal processing area. This indicates that the data is expanded to indicate danger. This indicates data with slight degradation. The asymmetric resampling results are composed of dangerous augmented data, mildly degraded data that meets the quantity requirements, and normal data with the target sample size.

[0039] In this embodiment of the invention, the fixed step size is determined by the formula... Calculated.

[0040] Specifically, training machine learning models using asymmetric resampling results includes: The classification decision tree is trained using the results of asymmetric resampling; The peak-preserving neural network model was trained using the current data from the asymmetric resampling results.

[0041] In this embodiment of the invention, the classification decision tree used is the conventional LightGBM model.

[0042] More specifically, training the classification decision tree using asymmetric resampling results includes: Feature extraction was performed on the asymmetric resampling results to obtain 11-dimensional features; The 11-dimensional features are normalized to obtain the normalized 11-dimensional features; The classification decision tree is initially trained using the normalized 11-dimensional features, resulting in the initial training classification decision tree and the global contribution rate of each feature. Based on the global contribution rate of each feature, the six features with the highest global contribution rate are selected to perform secondary training on the initially trained classification decision tree, resulting in the trained classification decision tree.

[0043] The reasoning process using the trained classification decision tree in this embodiment of the invention is as follows: inputting the pure pulse electrolytic processing short-circuit degradation dataset into the trained classification decision tree to perform short-circuit prediction, and obtaining the absolute probability value of the state, i.e. the short-circuit prediction result, which can be the absolute probability value of the normal state, the absolute probability value of the mildly degraded state, or the absolute probability value of the dangerous state.

[0044] Since the structure and data processing of classification decision trees are conventional techniques in this field, the embodiments of this invention will not elaborate on their processes one by one.

[0045] Since the absolute discharge current amplitude of pulse electrolytic machining varies by several times in different working conditions such as machining deep holes, cavities, and large-area planes, this embodiment of the invention performs normalization parameter mapping on the asymmetric resampling results to enable the trained model to have generalization and adaptability across working conditions, thereby obtaining normalized asymmetric resampling results.

[0046] Specifically, feature extraction is performed on the normalized asymmetric resampling results to obtain 11-dimensional features, including: The maximum pulse current is obtained by taking the maximum current value, minimum voltage value, and maximum voltage value from the 24 sampling points within the current period. Lowest on-state voltage Peak-to-peak value of on-state voltage ; The on-state average current is obtained by averaging the current samples from the 2nd to the 11th sample points within the current period. ; Through formula The variance of the on-state current is obtained by calculating the average of the squared deviations of the 2nd to 11th sampling points relative to their mean within the current period. ; Calculate the ratio of the mean of points 1-5 to the mean of points 6-10 to obtain the waveform asymmetry and trailing edge slope. ; The on-state average voltage is obtained by calculating the arithmetic mean of the 2nd to 11th voltage sampling points. On-state voltage variance Equivalent dynamic gap resistance estimation and the historical maximum current value over the past 10 cycles .

[0047] Specifically, the 11-dimensional features are normalized to obtain the expression for the normalized 11-dimensional features: ; in, This represents the feature matrix composed of the 11-dimensional features after normalization. This represents a feature matrix composed of 11 dimensions; The role of this normalization is to convert absolute physical quantities into statistical offset multiples relative to the baseline simplified state, thereby eliminating the scaling generalization curse caused by different equipment and different current levels of operating conditions on model inference from a mathematical perspective.

[0048] In this embodiment of the invention, the spike-preserving neural network is a technical reconstruction of the traditional deep learning model, including a first convolutional layer, a first max pooling layer, a second convolutional layer, a second max pooling layer, a global average pooling layer, a first fully connected layer, and a second fully connected layer connected in sequence. The input of the first convolutional layer is used to receive the current data from the asymmetric resampling results; The second fully connected layer is used to output the absolute probability value of the state, that is, the short-circuit prediction result, which can be the absolute probability value of the normal state, the absolute probability value of the slightly degraded state, or the absolute probability value of the dangerous state.

[0049] Since the data input into the peak-preserving neural network has already been normalized, the overall time-series waveform is in a perfectly physically aligned state. Introducing a batch normalization layer would not only destroy this absolute statistical benchmark defined by the underlying mechanism, but also increase the high floating-point computing power overhead at the inference end of the model. Therefore, this embodiment of the invention removes the batch normalization layer in the traditional deep learning model. Since the common convolutional layer with strides of 2 is prone to crossing or missing the steep leading edge of the pulse change in the critical period, this embodiment of the invention uses a full-retention one-dimensional convolution with strides=1 and padding='same', followed by a cascaded one-dimensional max pooling layer (MaxPooling1D) with pool_size=2. The max pooling layer forcibly captures and retains the maximum current impact feature in the local sliding window in situ, avoiding the smoothing or loss of transient spike precursors during downsampling.

[0050] Compared with existing technologies, this invention verifies and preprocesses voltage and current data collected during electrolytic machining to obtain a pure pulse electrolytic machining short-circuit degradation dataset. A benchmark stable operating region is extracted from this dataset, and the average and standard deviation of the maximum pulse current for all stable cycles within that region are calculated. The maximum pulse current between the endpoint of the benchmark stable operating region and the last data point in the pure pulse electrolytic machining short-circuit degradation dataset is time-series smoothed to obtain a smoothed peak sequence. Boundary thresholds are established using the average and standard deviation of the maximum pulse currents, and the pure pulse electrolytic machining short-circuit degradation dataset is classified and labeled based on the smoothed peak sequence and boundary thresholds to obtain labeling results. The dataset is resampled based on the labeling results to obtain asymmetric resampling results, which are then used to train a machine learning model to obtain a short-circuit prediction model. The pure pulse electrolytic machining short-circuit degradation dataset is then input into the short-circuit prediction model to predict short circuits, obtaining absolute probability values ​​of the states, thereby improving the accuracy of short-circuit prediction.

[0051] like Figure 2As shown, this embodiment of the invention also provides an electrolytic machining short-circuit prediction system 100, which applies an electrolytic machining short-circuit prediction method. The electrolytic machining short-circuit prediction system 100 includes: The acquisition module 101 is used to acquire voltage and current signals during the electrolytic processing to obtain voltage and current data. Verification module 102 is used to verify and preprocess voltage and current data to obtain a clean pulse electrolytic machining short-circuit degradation dataset; The calculation module 103 is used to extract the benchmark stable operating region from the pure pulse electrolytic machining short-circuit degradation dataset and calculate the average value and standard deviation of the maximum pulse current of all stable cycles within the benchmark stable operating region. Smoothing module 104 is used to perform time-series smoothing on the maximum pulse current between the end position of the reference stable operating region and the last data in the pure pulse electrolytic machining short-circuit degradation dataset, to obtain a smoothed peak sequence; The labeling module 105 is used to determine the boundary threshold using the average value and standard deviation of the maximum pulse current, and to classify and label the pure pulse electrolytic machining short-circuit degradation dataset based on the smooth peak sequence and the boundary threshold to obtain the labeling results. The resampling module 106 is used to resample the pure pulse electrolytic machining short-circuit degradation dataset based on the marking results to obtain asymmetric resampling results, and to train the machine learning model using the asymmetric resampling results to obtain a short-circuit prediction model. The short-circuit prediction module 107 is used to input the pure pulse electrolytic machining short-circuit degradation dataset into the short-circuit prediction model to perform short-circuit prediction and obtain the absolute probability value of the state.

[0052] In this embodiment of the invention, the acquisition module 101, the verification module 102, the calculation module 103, the smoothing module 104, the marking module 105, the resampling module 106, and the short-circuit prediction module 107 are all deployed in the microcontroller. The acquisition module 101 acquires voltage and current signals from two ADCs during the electrolytic processing and stores the data in an SD card.

[0053] To address the issues of slow dynamic addressing and packet loss in FatFS files under ultra-high frequency sampling, this invention employs the following combined storage optimization strategy: High-speed domain memory allocation: The ADC's DMA double buffer and the 10 large-capacity circular queues of the SD card are all forcibly allocated in the microcontroller's D1 domain AXI SRAM. By utilizing the high bandwidth characteristics of this bus domain, the DMA high-speed copy and the main loop write to the SD card are physically isolated in timing and do not interfere with each other. Large space pre-allocation mechanism: When initializing and creating a brand new BIN binary log file, a single silent allocation of 3.8GB of contiguous physical cluster space is provided.

[0054] This approach eliminates the need for dynamic file overhead during subsequent processing sessions that can last for tens of minutes. Instead, it avoids the dynamic file overhead of "finding free clusters -> modifying the FAT table -> allocating space" when writing data. This keeps f_write at the hardware write limit and completely eliminates DMA overflow and frame drop caused by file system write jitter.

[0055] In this embodiment of the invention, when an abnormal short circuit occurs during electrolytic processing, the trigger timer and DMA transmission of the dual-channel ADC are immediately stopped, the current voltage and current sampling environment is frozen, and the complete data blocks that have accumulated in the current circular queue but have not yet been written to the SD card are synchronously written all at once. By reading the DMA remaining counter register, the number of effective residual points actually sampled in the current buffer is calculated in reverse and accurately. Then, a temporary working area is opened, this part of the critical short circuit waveform is copied into it, and all the remaining invalid space of the data block is forcibly filled with zeros, thereby assembling a final data block with a standard format and writing it to the SD card.

[0056] It should be noted that the information interaction and execution process between the above systems / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0057] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0058] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for predicting short circuits in electrolytic machining, characterized in that, include: Step 1: Collect voltage and current signals during the electrolytic processing to obtain voltage and current data; Step 2: Verify and preprocess the voltage data and the current data to obtain a clean pulse electrolytic machining short-circuit degradation dataset; Step 3: Extract the benchmark stable operating region from the pure pulse electrolytic machining short-circuit degradation dataset, and calculate the average value and standard deviation of the single-cycle maximum pulse current of all stable cycles within the benchmark stable operating region; Step 4: Perform time-series smoothing on the maximum pulse current in each cycle between the end position of the reference stable operating zone and the last data in the pure pulse electrolytic machining short-circuit degradation dataset to obtain a smoothed peak sequence; Step 5: Develop a boundary threshold using the average value and standard deviation of the maximum pulse current, and classify and label the pure pulse electrolytic machining short-circuit degradation dataset based on the smoothed peak sequence and the boundary threshold to obtain the labeling results; Step 6: Based on the marking results, resample the pure pulse electrolytic machining short-circuit degradation dataset to obtain asymmetric resampling results, and use the asymmetric resampling results to train the machine learning model to obtain a short-circuit prediction model; Step 7: Input the pure pulse electrolytic machining short-circuit degradation dataset into the short-circuit prediction model to perform short-circuit prediction and obtain the absolute probability value of the state.

2. The electrolytic machining short-circuit prediction method according to claim 1, characterized in that, Step 2 includes: The voltage and current data are serially printed using a frequency reduction sampling snapshot mechanism to obtain the serial printing results. Based on the serial port printing results, the sampling trigger phase of the voltage data and the current data is adjusted to obtain the adjusted data; The adjusted data is subjected to a linear physical transformation to obtain the actual current value and the actual voltage value; Find the sampling point in the actual current value that corresponds to the global maximum pulse current of the entire processing process, and delete the actual current value after the sampling point to obtain the effective current value; The effective current value is classified based on the set discrimination threshold to obtain the classification result, which includes normal processing section, pre-short circuit precursor section, and confirmed short circuit section. The classification results are cleaned to obtain a clean pulse electrolytic machining short-circuit degradation dataset.

3. The electrolytic machining short-circuit prediction method according to claim 2, characterized in that, The classification results are cleaned to obtain a clean pulse electrolytic machining short-circuit degradation dataset, including: When the time interval between two pre-short circuit precursor segments or two determined short circuit segments is less than a preset threshold, the normal data between the two pre-short circuit precursor segments or two determined short circuit segments is deleted, and the two pre-short circuit precursor segments or two determined short circuit segments are merged to obtain merged pre-short circuit precursor segments and merged determined short circuit segments. Based on the macroscopic evolution curves of peak voltage and peak current throughout the entire electrolytic processing cycle, the voltage or current values ​​that are misaligned or drifted in the normal processing section are cleaned to obtain the first cleaning data. The merged pre-short circuit precursor segments are spliced ​​together according to the actual time difference calibration to obtain a complete pre-short circuit precursor segment. The voltage and current waveforms in the complete pre-short circuit precursor segment are mapped to the same coordinate axis for in-situ multi-frame overlapping topology drawing to obtain the abnormal stage stitched superimposed curve. In the abnormal stage stitching superposition curve, the atypical interference group of hydrogen evolution was identified and eliminated to obtain the second cleaning data; Based on the merged data within the determined short-circuit segment, the first cleaning data, and the second cleaning data, a pure pulse electrolytic machining short-circuit degradation dataset is obtained.

4. The electrolytic machining short-circuit prediction method according to claim 1, characterized in that, The expression for the smoothed peak sequence is: ; ; in, Indicates a smooth peak sequence. Indicates the first Smooth peak current of each cycle, Indicates the number of periods. Indicates the maximum pulse current. Indicates the first One cycle, This represents the offset of the sliding window.

5. The electrolytic machining short-circuit prediction method according to claim 4, characterized in that, The boundary thresholds include a first boundary threshold and a second boundary threshold; The pure pulse electrolytic short-circuit degradation dataset is classified and labeled based on the smoothed peak sequence and the boundary threshold to obtain the labeling results, including: In the pure pulse electrolytic machining short-circuit degradation dataset, data where the smoothed peak current of three consecutive cycles in the smoothed peak sequence is less than the first boundary threshold are selected, i.e., when... , At that time, hour The data before the corresponding sampling point is divided into a normal processing area, and all data in this normal processing area is labeled with a health status. In the pure pulse electrolytic machining short-circuit degradation dataset, the first peak in the smoothed peak sequence is... The smoothed peak current of the nth cycle is greater than or equal to the first boundary threshold, and the nth cycle of the smoothed peak sequence is greater than or equal to the first boundary threshold. Data whose smooth peak current in each cycle is less than the second boundary threshold and whose maximum peak current in a single cycle is less than the preset absolute hard threshold are classified as mildly degraded data, and all data in this mildly degraded data are marked with a warning label. In the pure pulse electrolytic machining short-circuit degradation dataset, the first peak in the smoothed peak sequence is... Data whose smooth peak current for a given period is greater than or equal to the second boundary threshold, or whose maximum peak current is greater than or equal to a preset absolute hard threshold, are classified as danger zones, and all data in these danger zones are labeled with a danger tag.

6. The electrolytic machining short-circuit prediction method according to claim 5, characterized in that, Based on the labeling results, the pure pulse electrolytic machining short-circuit degradation dataset is resampled to obtain asymmetric resampling results, including: The data of the danger zone is expanded based on the set sample capacity bidirectional clamping line to obtain danger expansion data; A hard capping intercept is set to resample the data in the slightly degraded region to obtain slightly degraded data that meets the quantity requirements; Based on the total sample size of the dangerous expansion data and the mild degradation data, the target sampling number of the normal processing area is dynamically calculated, and resampling is performed in the normal processing area with a fixed step size to obtain the normal data of the target sampling number. The asymmetric resampling result is composed of the aforementioned dangerous augmented data, the slightly degraded data that meets the quantity requirements, and the normal data of the target sampling number.

7. The electrolytic machining short-circuit prediction method according to claim 6, characterized in that, Training a machine learning model using the asymmetric resampling results includes: The classification decision tree is trained using the asymmetric resampling results; The peak-preserving neural network model was trained using the current data from the asymmetric resampling results.

8. The electrolytic machining short-circuit prediction method according to claim 7, characterized in that, Training the classification decision tree using the asymmetric resampling results includes: Feature extraction is performed on the asymmetric resampling results to obtain 11-dimensional features; The 11-dimensional features are normalized to obtain the normalized 11-dimensional features; The classification decision tree is initially trained using the normalized 11-dimensional features, resulting in the initial training classification decision tree and the global contribution rate of each feature. Based on the global contribution rate of each feature, the six features with the highest global contribution rate are selected to perform secondary training on the initially trained classification decision tree, resulting in the trained classification decision tree.

9. The method for predicting short circuits in electrolytic machining according to claim 7, characterized in that, The spike-preserving neural network model includes a first convolutional layer, a first max pooling layer, a second convolutional layer, a second max pooling layer, a global average pooling layer, a first fully connected layer, and a second fully connected layer connected in sequence. The input of the first convolutional layer is used to receive the current data in the asymmetric resampling result; The second fully connected layer is used to output the absolute probability value of the state.

10. A short-circuit prediction system for electrolytic machining, characterized in that, The electrolytic machining short-circuit prediction system, using the electrolytic machining short-circuit prediction method as described in any one of claims 1-9, comprises: The acquisition module is used to acquire voltage and current signals during the electrolytic processing to obtain voltage and current data. The verification module is used to verify and preprocess the voltage data and the current data to obtain a clean pulse electrolytic machining short-circuit degradation dataset. The calculation module is used to extract a benchmark stable operating region from the pure pulse electrolytic machining short-circuit degradation dataset, and to calculate the average value and standard deviation of the maximum pulse current of all stable cycles within the benchmark stable operating region; The smoothing module is used to perform time-series smoothing on the maximum pulse current between the end position of the reference stable operating region and the last data in the pure pulse electrolytic machining short-circuit degradation dataset, to obtain a smoothed peak sequence; The labeling module is used to determine the boundary threshold using the average value and standard deviation of the maximum pulse current, and to classify and label the pure pulse electrolytic short-circuit degradation dataset based on the smoothed peak sequence and the boundary threshold to obtain the labeling results; The resampling module is used to resample the pure pulse electrolytic short-circuit degradation dataset based on the marking results to obtain asymmetric resampling results, and to train the machine learning model using the asymmetric resampling results to obtain a short-circuit prediction model. The short-circuit prediction module is used to input the pure pulse electrolytic machining short-circuit degradation dataset into the short-circuit prediction model to perform short-circuit prediction and obtain the absolute probability value of the state.