Electrolytic machining short circuit prediction and protection method, device, equipment and medium
By generating a pre-short-circuit voltage waveform dataset and training an electrolytic machining short-circuit prediction model with a scenario-adaptive hybrid neural network, combined with edge deployment and a three-level safety interlocking mechanism, the problem of short-circuit prediction accuracy during electrolytic machining is solved, and effective protection of the electrolytic machining platform is achieved.
Patent Information
- Application Number
- CN202511209669.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies cannot effectively predict and prevent short circuits during electrolytic machining, which can lead to workpiece surface burns, tool electrode damage, and pulse power supply overcurrent damage.
A pre-short-circuit voltage waveform dataset is generated using a gap active modulation method. An electrolytic machining short-circuit prediction model is trained using a scenario-adaptive hybrid neural network architecture. Short-circuit prediction and protection are achieved by combining edge deployment and a three-level safety interlocking mechanism.
It improves the accuracy and timeliness of short circuit prediction in electrolytic machining, and avoids damage to the electrolytic machining platform caused by short circuits.
Smart Images

Figure CN120978635A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electrolytic machining control, and in particular to an electrolytic machining short-circuit prediction and protection method, device, equipment and medium. BACKGROUND
[0002] Electrolytic machining is a non-contact special machining technology that removes material through the principle of electrochemical anodic dissolution. In this process, the dynamic change of the gap between the tool electrode and the workpiece (usually maintained at 10-100 μm) is the core parameter to ensure machining accuracy. If the gap is too small or metal chips accumulate, it will cause instantaneous short-circuit, causing workpiece surface burn, tool electrode damage, and even pulse power overcurrent damage.
[0003] The prior art and its defects are as follows:
[0004] (1) The oscilloscope monitors the inter-pulse voltage between the tool electrode and the workpiece, and determines short-circuit when the voltage drops to zero, then cuts off the power supply and retracts the workpiece, which cannot prevent damage caused by short-circuit;
[0005] (2) The embedded edge detection system technology scheme deploys a lightweight model to an embedded platform to realize real-time defect detection or image recognition, but its response speed cannot meet the protection requirements, and it cannot detect and protect different working conditions corresponding to electrolytic short-circuit types. SUMMARY
[0006] To solve at least one of the technical problems existing in the prior art, the present application provides an electrolytic machining short-circuit prediction and protection method, device, equipment and medium, which improves the accuracy and timeliness of electrolytic machining short-circuit prediction.
[0007] One aspect of the present application provides an electrolytic machining short-circuit prediction and protection method, comprising:
[0008] Obtaining a normal voltage waveform data set, and generating a pre-short-circuit voltage waveform data set of different working condition scenarios using a gap active modulation method;
[0009] Performing preprocessing on the normal voltage waveform data set and the pre-short-circuit voltage waveform data set to obtain training data;
[0010] Training a scene-adaptive hybrid neural network architecture according to the training data to obtain an electrolytic machining short-circuit prediction model;
[0011] Obtaining the working condition scenario and real-time voltage waveform data of the electrolytic machining platform, and using an edge-deployed electrolytic machining short-circuit prediction model to predict the real-time voltage waveform data to obtain a short-circuit prediction probability;
[0012] According to the working condition scene of the electrolytic machining platform, the short circuit prediction probability and the short circuit threshold range, the protection processing of the electrolytic machining platform is performed.
[0013] According to the electrolytic machining short circuit prediction and protection method, the gap active modulation method is adopted to generate the pre-short circuit voltage waveform data set of different working condition scenes, including:
[0014] The electrolytic machining platform including a z-axis module and a piezoelectric displacement platform is controlled by a third-order motion curve, and the single reciprocating motion of the electrolytic machining platform during control is sampled by STM32 through DMA double buffer to obtain voltage signal data.
[0015] The voltage signal data is subjected to normalization processing to obtain the pre-short circuit voltage waveform data set.
[0016] According to the electrolytic machining short circuit prediction and protection method, the normal voltage waveform data set and the pre-short circuit voltage waveform data set are preprocessed to obtain training data, including:
[0017] The normal voltage waveform data set and the pre-short circuit voltage waveform data set are subjected to data cleaning, data segmentation and data labeling to obtain the training data, wherein the data labeling is labeled according to the working condition scene.
[0018] According to the electrolytic machining short circuit prediction and protection method, the training data is trained by using a scene adaptive hybrid neural network architecture to obtain an electrolytic machining short circuit prediction model, including:
[0019] The training data is subjected to feature extraction by the scene adaptive hybrid neural network architecture to obtain a first feature extraction result and a scene identifier, wherein the scene identifier is used to represent the working condition scene corresponding to each feature;
[0020] According to the scene identifier, the corresponding branch network is used for feature extraction to obtain a second feature extraction result;
[0021] The first feature extraction result and the second feature extraction result are weighted and fused according to the scene identifier to obtain a fusion result, and one of the fusion result and the second feature extraction result is used as the final classification input;
[0022] The final classification input is subjected to classification processing by using a full connection layer and an activation function to obtain a short circuit probability.
[0023] The prediction is repeatedly performed for a predetermined number of times or the model parameters reach a preset value to obtain the electrolytic machining short circuit prediction model.
[0024] According to the electrolytic machining short circuit prediction and protection method, the scene adaptive hybrid neural network architecture includes:
[0025] The general feature extraction backbone network, the scene-specific branch network, the scene-adaptive fusion layer and the classification output layer, wherein the feature extraction backbone network adopts a 1D convolution layer or a time series convolution layer to extract basic features and cross-scene shared space-time features from the training data to obtain the first feature extraction result; the scene-specific branch network includes a BiLSTM branch, an Attention branch and a Pooling branch, the BiLSTM branch is used to extract the training data for a deep small hole machining scene, the Attention branch is used to extract features for a cavity machining scene, and the Pooling branch is used to extract features for a planar machining scene to obtain a second feature extraction result; wherein the weighted fusion is performed by the scene-adaptive fusion layer to weight and fuse the first feature extraction result, the second scene extraction result and the scene identifier to obtain a fusion result; and the classification layer adopts a full connection layer and a Sigmoid activation function to output a short circuit probability.
[0026] According to the electrolytic machining short circuit prediction and protection method, the working condition scene and the real-time voltage waveform data of the electrolytic machining platform are obtained, and the electrolytic machining short circuit prediction model deployed at the edge is used to predict the real-time voltage waveform data to obtain a short circuit prediction probability, including:
[0027] The real-time voltage waveform data is subjected to working condition feature recognition to obtain working condition features, wherein the working condition features include at least one of rising edge and falling edge slope, high level oscillation, low level integral area, waveform symmetry degree, overshoot voltage, duty cycle deviation of planar machining, cycle consistency, noise energy ratio and preset machining parameters;
[0028] According to the association relationship between the working condition features and the working condition scene, a scene identifier is determined;
[0029] According to the scene identifier and the real-time voltage waveform data, a scene-specific branch network of the electrolytic machining short circuit prediction model is selected for prediction to obtain a short circuit prediction probability.
[0030] According to the electrolytic machining short circuit prediction and protection method, according to the working condition scene of the electrolytic machining platform, the short circuit prediction probability and the short circuit threshold range, a protection process of the electrolytic machining platform is performed, including:
[0031] According to the short circuit prediction probability and the working condition scene, a short circuit threshold range in which the electrolytic machining platform is located is determined;
[0032] According to the short circuit threshold range in which the electrolytic machining platform is located, a three-level safety locking mechanism is used to protect the electrolytic machining platform, wherein the three-level safety locking mechanism includes a double-threshold grading response, a hardware straight-through shutdown and a safety lock.
[0033] Another aspect of the present application provides an electrolytic machining short circuit prediction and protection device, comprising:
[0034] A first module is configured to obtain a normal voltage waveform data set, and generate a pre-short circuit voltage waveform data set of different working condition scenarios by using a gap active modulation method;
[0035] A second module is configured to perform preprocessing on the normal voltage waveform data set and the pre-short circuit voltage waveform data set to obtain training data;
[0036] A third module is configured to train a scene adaptive hybrid neural network architecture according to the training data to obtain an electrolytic machining short circuit prediction model;
[0037] A fourth module is configured to obtain a working condition scenario and real-time voltage waveform data of an electrolytic machining platform, and obtain a short circuit prediction probability by using the electrolytic machining short circuit prediction model on the real-time voltage waveform data;
[0038] A fifth module is configured to perform protection processing on the electrolytic machining platform according to the working condition scenario of the electrolytic machining platform, the short circuit prediction probability and a short circuit threshold range.
[0039] Another aspect of the embodiment of the present application provides an electronic device comprising a processor and a memory;
[0040] The memory is configured to store a program;
[0041] The processor executes the program to implement the method as described above.
[0042] The embodiment of the present application also discloses a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the method as described above.
[0043] The present application has the following beneficial effects: the gap active modulation method driven by the potential displacement platform can quickly obtain the voltage waveform data set of the pre-short circuit; the scene adaptive hybrid neural network architecture is used to train different working condition scenarios of the electrolytic machining to obtain the electrolytic machining short circuit prediction model, which can break through the small sample training limit of the industrial scene, improve the short circuit prediction accuracy, and realize the pre-protection of the electrolytic machining platform to avoid the damage of the electrolytic machining platform due to the short circuit. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is an electrolytic machining short circuit prediction and protection flowchart of the embodiment of the present application;
[0045] Figure 2 is a gap active modulation flowchart of an electric displacement platform drive of an embodiment of the present application;
[0046] Figure 3 is a short-circuit voltage waveform data set collection structure diagram of an electrolytic machining platform of an embodiment of the present application;
[0047] Figure 4 is a scene adaptive hybrid neural network architecture training flowchart of an embodiment of the present application.
[0048] Figure 5 is a scene adaptive hybrid neural network architecture diagram of an embodiment of the present application.
[0049] Figure 6 is a short-circuit prediction probability prediction flowchart of an embodiment of the present application.
[0050] Figure 7 is a protection processing flowchart of an electrolytic machining platform of an embodiment of the present application.
[0051] Figure 8 is a hardware pass-through shutdown flowchart of an embodiment of the present application.
[0052] Figure 9 is an electrolytic machining short-circuit prediction and protection system diagram of an embodiment of the present application.
[0053] Figure 10 is an electrolytic machining short-circuit prediction and protection device diagram of an embodiment of the present application. DETAILED DESCRIPTION
[0054] Embodiments of the present application are described in detail below with reference to the attached drawings, which show by way of example, embodiments in which the same or similar elements are denoted by the same or similar reference numerals throughout the drawings. In the following description, the suffixes "module", "part" or "unit" used for elements are merely intended for facilitating explanation of the present application, and have no special meaning in themselves. Therefore, "module", "part" or "unit" can be used interchangeably. "First", "second", etc. are used only to distinguish technical features for the purpose of explanation, and cannot be understood to indicate or imply relative importance or to imply the number of technical features indicated or the order of technical features indicated. In the following description, the consecutive numbers of the method steps are for the convenience of review and understanding, and adjusting the implementation order between the steps does not affect the technical effects achieved by the technical solution of the present application, in combination with the overall technical solution of the present application and the logical relationship between the steps. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application.
[0055] Reference Figure 1 , Figure 1 is an electrolytic machining short circuit prediction and protection process of an embodiment of the application, which includes but is not limited to steps S100-S500:
[0056] S100, obtaining a normal voltage waveform data set, and generating a pre-short circuit voltage waveform data set of different working condition scenarios by using a gap active modulation method.
[0057] In some embodiments, the working condition scenarios include deep small hole machining scenarios, cavity machining scenarios, and plane machining scenarios.
[0058] In some embodiments, the normal voltage waveform data set is obtained by an STM32 built-in 12-bit ADC, specifically, the voltage signal is sequentially passed through a voltage divider resistor, a voltage follower, and an ADC to obtain the normal voltage waveform data set.
[0059] In some embodiments, in order to solve the problem of relatively scarce specific scene annotation data, an electrolytic machining platform including a z-axis module and a piezoelectric displacement platform is controlled by a third-order motion curve, and a single reciprocating motion of the electrolytic machining platform during control is sampled by an STM32 to obtain voltage signal data; the voltage signal data is normalized to obtain a pre-short circuit voltage waveform data set.
[0060] The DMA double buffer method includes using a double buffer mode to realize seamless switching of data acquisition, when one buffer is full, the other buffer continues to collect, and when the ADC conversion is completed, the data is automatically transmitted to the designated memory buffer, avoiding CPU carrying delay and improving the efficiency of data acquisition.
[0061] Reference Figure 2 The gap active modulation process schematic diagram of the piezoelectric displacement platform drive is shown in the figure, first through the host computer control Z-axis module (stroke ≥100mm) drive cantilever frame fast positioning to realize large stroke coarse adjustment, then use German PI company high precision piezoelectric displacement platform (positioning accuracy ±0.1μm, response frequency ≥1kHz) through bolt and workpiece rigid locking, respond to PWM voltage signal to realize μm level precision motion, build active short circuit data generation system. The system generates short circuit and pre-short circuit waveform data in batches within a few seconds through closed-loop control of workpiece micro-displacement, completely solving the problem of insufficient pre-short circuit samples in the traditional passive collection mode.
[0062] Reference Figure 3 The short circuit voltage waveform data set collection structure schematic diagram of the electrolytic machining platform is shown in the figure, and the process is as follows:
[0063] The piezoelectric displacement platform is rigidly bound to the workpiece and is locked with the cantilever beam through bolts, and is driven by a PWM voltage signal (frequency range: 0.1-100Hz adjustable), that is, the z-axis module realizes large displacement, and the piezoelectric displacement platform realizes micron-level movement under the condition that the z-axis module is stationary;
[0064] A three-order motion curve control is adopted, the Z-axis module displacement platform is fed down by the upper computer control to approach, the piezoelectric displacement platform is micro-fed at a constant speed, and the Z-axis module is quickly retreated by the upper computer control.
[0065] Displacement feedback: the Z-axis module displacement platform is fed down by the upper computer control, and the initial distance between the workpiece and the tool is known. By setting the feed distance, the upper computer can display the current distance between the workpiece and the tool.
[0066] Among them, a single reciprocating motion (period 200ms) can generate 5-8 short circuit period data, and the collection efficiency is improved by more than 200 times under natural working conditions.
[0067] S200, pre-processing is performed on the normal voltage waveform data set and the pre-short circuit voltage waveform data set to obtain training data.
[0068] In some embodiments, the training data is obtained by performing data cleaning, data segmentation and data labeling on the normal voltage waveform data set and the pre-short circuit voltage waveform data set, wherein the data labeling is labeled according to the working condition scene.
[0069] Specifically, the data cleaning of the two data sets (i.e. the normal voltage waveform data set and the pre-short circuit voltage waveform data set) includes removing the first and last incomplete period data with 25 high-level and low-level points as a complete period. Read the normal voltage waveform data set and the pre-short circuit voltage waveform data set, that is, the cleaned file containing voltage data (such as CSV file). The data is segmented by 50 points per cycle. Extract the statistical features (mean, maximum, minimum, standard deviation, high-level proportion, low-level duration) of each cycle. Use the pre-defined rules (maximum voltage, high-level proportion, low-level duration) to mark the pre-short circuit (i.e. short circuit) period. For example: the maximum voltage is lower than 1.5V, or the high-level proportion is lower than 20%, or the low-level duration is more than 35 points. Use the K-means algorithm to divide the cycle features into two categories (normal and pre-short circuit), and identify the pre-short circuit period according to the clustering result. Since the pre-short circuit data set contains normal and pre-short circuit period data during extraction, the pre-short circuit data set extracted by the algorithm still needs to be verified. Specifically, the pre-short circuit data set is visualized and verified.
[0070] In some embodiments, all samples in the normal voltage waveform data set and the pre-short-circuit voltage waveform data set are randomly shuffled, and then feature extraction is performed, including: original voltage signal (50 sampling points), maximum value (Max) and minimum value (Min), and zero-crossing number. Normalize the extracted features so that all feature values are in the [0, 1] value range, and finally reformat the processed data into an input format suitable for the model (three-dimensional array).
[0071] In some embodiments, data segmentation is to divide the training data into a certain proportion of training set and test set, such as 80% training set and 20% test set, and further divide the test set into validation set and final test set, each accounting for 50% of the original test set.
[0072] In some embodiments, the data labeling of the pre-short-circuit voltage waveform data set includes:
[0073] Record and label the corresponding processing scene type (such as deep and small hole processing, cavity processing, and large area plane processing) of each data, and the scene type is pre-set by the operator according to the workpiece geometry, processing parameters (such as current density, electrolyte pressure / flow rate) and typical short circuit risk mode or automatically labeled by simple rules (such as deep diameter ratio > 5:1 is determined as deep and small hole scene).
[0074] S300, training an electrolytic machining short circuit prediction model according to the training data using a scene-adaptive hybrid neural network architecture.
[0075] Reference Figure 4 The scene-adaptive hybrid neural network architecture training process diagram shown includes but is not limited to steps S310-S350:
[0076] S310, feature extraction is performed on the training data by the scene-adaptive hybrid neural network architecture to obtain a first feature extraction result and a scene identifier, wherein the scene identifier is used to represent the working condition scene corresponding to each feature;
[0077] S320, according to the scene identifier, the corresponding branch network is used for feature extraction respectively to obtain a second feature extraction result;
[0078] S330, according to the scene identifier, the first feature extraction result and the second feature extraction result are weighted and fused to obtain a fusion result, and one of the fusion result and the second feature extraction result is used as the final classification input;
[0079] S340, the final classification input is classified by using a full connection layer and an activation function to obtain a short circuit probability;
[0080] S350, repeatedly performing the prediction for a prediction number of times or until a preset value of a model parameter is reached to obtain an electrolytic machining short circuit prediction model
[0081] In some embodiments, the first feature extraction result is a cross-space-time feature, and the second feature extraction result is a feature in different application scenarios
[0082] In view of the problem that short circuit precursor data characteristics are significantly different in different application scenarios (such as deep and small hole machining, cavity machining, and large-area plane machining) of electrolytic machining (such as different application scenarios, the rising and falling edge slope, duty cycle deviation, waveform symmetry, voltage peak value distribution, high-level proportion, and standard deviation are different), a single lightweight TCN model is abandoned, and a scene-adaptive hybrid neural network architecture (Scene-Adaptive Hybrid Neural Network, SAHNN) is proposed. The architecture includes a general feature extraction layer and a scene-specific branch, and dynamically selects or fuses the branch according to the real-time working condition. The scene-adaptive core principle: the model is not preset with multiple independent models, but an intelligent routing network is constructed. Understandably, the model trained by the scene-adaptive hybrid neural network architecture of the embodiment of the application activates the corresponding processing channel according to the scene identifier, the branch of the non-current scene is automatically closed, and only a single path calculation is performed in actual operation.
[0083] In some embodiments, the reference Figure 5 The scene-adaptive hybrid neural network architecture diagram shown in the figure includes an input layer, a general feature extraction backbone network, a scene-specific branch network, a scene-adaptive fusion / selection layer, and a classification output layer.
[0084] The input layer (Input Layer): data input, fixed 53 dimensions (50 waveform points + maximum, minimum, and zero-crossing rate 3 features); scene input, additionally receives a scene ID (0 = deep and small hole, 1 = cavity, and 2 = plane).
[0085] The general feature extraction backbone network (G-Backbone): a lightweight one-dimensional convolution layer (Conv1D) or a time series convolution layer (TCN Block) is used, which is responsible for extracting basic cross-scene space-time features from the original time series signal (50 points + PWM period features), for example, Input (53, 1) → Conv1D (16, kernel = 5) → MaxPooling1D (2). The general layer can share basic waveform feature extraction for all scenes, which can reduce repeated calculation and improve efficiency.
[0086] Scene-specific Branch Network (S-Branch): Design a lightweight specialized branch network for each typical scenario (e.g. deep small hole machining, cavity machining, large area plane machining). Each branch can be: a deeper convolutional layer (for complex patterns specific to the scenario), an attention mechanism module (for key feature regions specific to the scenario), a gated recurrent unit (GRU) or bidirectional LSTM (BiLSTM) module (for strong temporal dependencies specific to the scenario), a feature selection / weighting layer (for feature importance differences specific to the scenario). In this system, bidirectional LSTM is used for deep small hole scenarios to handle long temporal dependencies, attention mechanism is introduced for cavity scenarios to focus on key features, and global pooling structure is used for plane scenarios. Each branch has a parameter size of less than ~20KB to ensure that the overall model size is controllable. The scene ID encoding is used as a weight to select the corresponding branch output, ensuring that only the branch for the current scenario is activated during inference, reducing computational complexity. Refer to Table 1 for details.
[0087] Table 1: Scene-specific Branch (S-Branch) applicable scenarios
[0088] Scene Adaptive Fusion / Selection Layer (SA-Layer): Receives the output of the general feature extraction backbone network and the current scene identifier (Scene ID). According to the current scene identifier (Scene ID), the scene adaptive fusion / selection layer (SA-Layer) performs:
[0089] (1) Branch selection mode: Directly activate the scene-specific branch network (S-Branch) corresponding to the current scene, and its output is used as the final classification input.
[0090] (2) Feature fusion mode: Weighted fusion (e.g. concat+FC, attention-based fusion) of the output of the general feature extraction backbone network (G-Backbone) and the output of the scene-specific branch network (S-Branch) corresponding to the current scene, and the fusion result is used as the final classification input. The fusion weights can also be dynamically generated by a small network based on the scene identifier (Scene ID) and the general feature extraction backbone network (G-Backbone) features.
[0091] In some embodiments, the scene adaptive fusion / selection layer only activates the branch corresponding to the current scene, and the weights of other branches are 0, not participating in the calculation. An example is as follows:
[0092] # Merge branch outputs by scene ID weighting
[0093] branch_outputs = [branch0, branch1, branch2] # Outputs of each branch
[0094] scene_weights = tf.one_hot(scene_id, depth=3) # Scene weights
[0095] weighted_output = tf.reduce_sum(
[0096] branch_outputs tf.reshape(scene_weights, [-1, 3, 1]),
[0097] axis=1 )
[0099] Classification output layer: Receives the output of the scene adaptive fusion / selection layer (SA-Layer), outputs the short-circuit probability through a fully connected layer and a sigmoid activation function, for example, Dense(32,activation='relu')→Dropout(0.3)→Dense(1,activation='sigmoid'), and finally outputs a short-circuit probability of 0~1, where 1 indicates that a short circuit is about to occur.
[0100] S400 acquires the operating conditions and real-time voltage waveform data of the electrolytic machining platform, and uses an edge-deployed electrolytic machining short-circuit prediction model to predict the real-time voltage waveform data to obtain the short-circuit prediction probability.
[0101] In some embodiments, reference Figure 6 The flowchart shown includes, but is not limited to, steps S410-S430:
[0102] S410 performs operating condition feature identification on real-time voltage waveform data to obtain operating condition features;
[0103] S420, determine the scenario identifier based on the correlation between operating condition characteristics and operating scenario;
[0104] S430 selects the scene-specific branch network of the electrolytic machining short-circuit prediction model based on the scene identifier and real-time voltage waveform data to make predictions and obtain the short-circuit prediction probability.
[0105] In some embodiments, the pre-trained electrolytic machining short-circuit prediction model is converted into a highly optimized STM32 native inference library using the STM32Cube.AI toolchain and run on an STM32F7.
[0106] It can be understood that real-time identification of which preset scene (Scene ID) the current processing belongs to on the STM32F7 is the key to activating the corresponding SAHNN branch. Real-time working condition characteristics that are easy to calculate and can distinguish scenes are extracted, such as the rising and falling slope of a deep small hole, high-level oscillation reading, low-level integral area of a cavity, waveform symmetry, overshoot voltage, duty cycle deviation of flat processing, periodic consistency, noise energy ratio, preset processing parameters (such as the set feed speed, current density - from the host computer or configuration file), etc. When reasoning, the scene identifier Scene ID is input into the scene adaptive fusion / selection layer SA-Layer, and the corresponding scene-specific branch network S-Branch is activated or fused.
[0107] S500, according to the working condition scene of the electrolytic machining platform, the short circuit prediction probability and the short circuit threshold range, performing protection processing of the electrolytic machining platform.
[0108] In some embodiments, refer to Figure 7 the protection processing flowchart of the electrolytic machining platform shown, which includes but is not limited to steps S510~S520:
[0109] S510, according to the short circuit prediction probability and the working condition scene to determine the short circuit threshold range where the electrolytic machining platform is located;
[0110] S520, according to the short circuit threshold range where the electrolytic machining platform is located, adopting a three-level safety interlocking mechanism to perform protection response processing on the electrolytic machining platform, wherein the three-level safety interlocking mechanism includes a double-threshold graded response, a hardware straight-through shutdown and a safety interlock.
[0111] In some embodiments, the double-threshold graded response includes:
[0112] (1) Double-threshold graded response, by setting a higher probability threshold (such as SHORT_CIRCUIT_THRESHOLD=0.92) representing that a serious short circuit is about to occur. Only when the model is very "sure" (high confidence) that a short circuit will occur soon, the highest level of protection action is triggered, in order to avoid frequent shutdown of processing due to low-level risks such as noise and small model errors, affecting normal processing.
[0113] (2) Refer to Figure 8The illustrated hardware pass-through shutdown flowchart, wherein the hardware pass-through shutdown is HAL TIM PWM Stop (& htim2, TIM CHANNEL 1), once it is confirmed to be a high-risk level, the library function HAL TIM PWM Stop of the hardware timer (TIM2) is immediately called. It does not depend on the scheduling of the operating system, software tasks, as long as the CPU executes this instruction, the hardware response time is extremely fast, usually in the order of microseconds (much faster than the ms level controlled by software) to complete the shutdown action.
[0114] (3) The global lock flag is used, that is, volatile uint8_t short_circuit_detected = 0; After the first trigger, short_circuit_detected = 1 is set to avoid repeated on-off; The operator needs to manually reset the system after checking the electrode gap; Record the voltage / current characteristics (maximum value, minimum value, zero-crossing point number) at the time of triggering.
[0115] In some embodiments, taking the planar machining scene of the electrolytic machining platform as an example, Table 2 below represents the short-circuit threshold range thereof, which is used to represent the short-circuit risk level thereof.
[0116] Table 2 Short-circuit threshold range of planar machining scene
[0117] In some embodiments, referring to Figure 9 The illustrated electrolytic machining short-circuit prediction and protection system schematic diagram includes a signal acquisition module for acquiring real-time voltage waveform data of a PWM voltage source, an AI inference module including an edge AI deployed electrolytic machining short-circuit prediction model, and an electrolytic machining short-circuit prediction model for predicting real-time voltage waveform data to obtain a short-circuit prediction probability, and performing corresponding control processing through a PWM shutdown controller according to the short-circuit prediction probability.
[0118] Figure 10 The electrolytic machining short-circuit prediction and protection device schematic diagram of the embodiment of the present application. The device includes a first module 1010, a second module 1020, a third module 1030, a fourth module 1040, a fifth module 1050, and a sixth module 10100.
[0119] The first module is used for obtaining electrolytic machining data by using a gap active modulation method, obtaining a normal voltage waveform data set and a pre-short circuit voltage waveform data set of different working condition scenes, obtaining the normal voltage waveform data set, and generating the pre-short circuit voltage waveform data set of different working condition scenes by using the gap active modulation method; the second module is used for performing preprocessing on the normal voltage waveform data set and the pre-short circuit voltage waveform data set to obtain training data; the third module is used for training a scene adaptive hybrid neural network architecture according to the training data to obtain an electrolytic machining short circuit prediction model; the fourth module is used for obtaining a working condition scene and real-time voltage waveform data of an electrolytic machining platform, and obtaining a short circuit prediction probability by using the electrolytic machining short circuit prediction model on the real-time voltage waveform data; and the fifth module is used for performing protection processing on the electrolytic machining platform according to the working condition scene of the electrolytic machining platform, the short circuit prediction probability and a short circuit threshold range.
[0120] Exemplarily, under the cooperation of the first module, the second module, the third module, the fourth module and the fifth module in the device, the embodiment device can implement any one of the electrolytic machining short circuit prediction and protection methods described above, that is, obtaining a normal voltage waveform data set, and generating a pre-short circuit voltage waveform data set of different working condition scenes by using a gap active modulation method; performing preprocessing on the normal voltage waveform data set and the pre-short circuit voltage waveform data set to obtain training data; training a scene adaptive hybrid neural network architecture according to the training data to obtain an electrolytic machining short circuit prediction model; obtaining a working condition scene and real-time voltage waveform data of an electrolytic machining platform, and obtaining a short circuit prediction probability by using an edge deployment electrolytic machining short circuit prediction model on the real-time voltage waveform data; and performing protection processing on the electrolytic machining platform according to the working condition scene of the electrolytic machining platform, the short circuit prediction probability and a short circuit threshold range. The beneficial effects of the present application are as follows: the gap active modulation method driven by the potential displacement platform can quickly obtain a pre-short circuit voltage waveform data set; the scene adaptive hybrid neural network architecture is used to train different working condition scenes of electrolytic machining to obtain an electrolytic machining short circuit prediction model, which can break through the small sample training limit of an industrial scene, improve the short circuit prediction accuracy, and realize the pre-protection of the electrolytic machining platform to avoid damage to the electrolytic machining platform due to short circuit.
[0121] The embodiment of the present application further provides an electronic device, which comprises a processor and a memory.
[0122] The memory stores a program.
[0123] The processor executes the program to perform the aforementioned electrolytic machining short-circuit prediction and protection method; the electronic device has the function of carrying and running the software system of the electrolytic machining short-circuit prediction and protection provided by the embodiment of the present application, for example, a personal computer, a mini-computer, a mainframe, a workstation, a network or a distributed computing environment, a single or integrated computer platform, or communication with a charged particle tool or other imaging device, and the like.
[0124] The embodiment of the present application also provides a computer readable storage medium, the storage medium stores a program, and the program is executed by a processor to realize the electrolytic machining short-circuit prediction and protection method as described above.
[0125] In some alternative embodiments, the functions / operations mentioned in the block diagram can not occur in the order mentioned in the operation diagram. For example, depending on the functions / operations involved, two blocks shown in succession can actually be executed substantially simultaneously with each other, or the blocks can sometimes be executed in reverse order. In addition, the embodiments presented and described in the flowcharts of the present application are provided by way of example, and the purpose is to provide a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logical flow presented by the embodiments of the present application. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are independently executed.
[0126] The embodiment of the present application also discloses a computer program product or a computer program, the computer program product or the computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the aforementioned electrolytic machining short-circuit prediction and protection method.
[0127] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features described can be integrated in a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It can also be understood that a detailed discussion of the actual implementation of each module is unnecessary for an understanding of the present application. Rather, given the properties, functions and internal relationships of the various functional modules disclosed in the embodiments of the present application, the actual implementation of the module will be within the routine skill of an engineer, given the properties, functions and internal relationships of the various functional modules disclosed in the embodiments of the present application. Therefore, those skilled in the art can implement the present application as set forth in the claims without undue experimentation using ordinary skill. It can also be understood that the disclosed specific concepts are merely illustrative and are not intended to limit the scope of the present application, the scope of the present application being determined by the full scope of the appended claims and their equivalents.
[0128] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions of the present application can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0129] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logic functions, which can be embodied in any computer readable medium for use by or in connection with an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute the instructions, or in conjunction with these instruction execution systems, apparatus or devices. For the purpose of this specification, "computer readable medium" can be any device that can include, store, communicate, propagate or transport programs for use by or in connection with an instruction execution system, apparatus or device, or in conjunction with these instruction execution systems, apparatus or devices.
[0130] More specific examples (non-exhaustive list) of the computer readable medium include the following: an electrical connection having one or more wires (electrical devices), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CD ROM). In addition, the computer readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be obtained electronically, for example, by optical scanning of the paper or other medium, followed by editing, interpreting or otherwise processing, if necessary, in other suitable ways, to be electronically obtained and then stored in the computer memory.
[0131] It should be understood that aspects of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, various steps or methods can be implemented in software or firmware which is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following technologies, known in the art, can be used: a combination of discrete logic circuits having logic gates for implementing logic functions upon an application of data signals, application specific integrated circuits having logic gates, field programmable gate arrays (FPGA), or others.
[0132] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples.
[0133] Although the embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, alternatives, and variations can be made to the embodiments without departing from the principles and spirit of the application, and the scope of the present application is defined by the appended claims and their equivalents.
[0134] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the described embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are included in the scope defined by the claims of the present application.
Claims
1. A method for predicting and protecting short circuits in electrolytic machining, characterized in that, include: Acquire a set of normal voltage waveform data, and generate pre-short-circuit voltage waveform datasets for different operating conditions using a gap active modulation method; Preprocessing is performed on the normal voltage waveform dataset and the pre-short-circuit voltage waveform dataset to obtain training data; Based on the training data, a scenario-adaptive hybrid neural network architecture was used for training to obtain an electrolytic machining short-circuit prediction model. The working conditions and real-time voltage waveform data of the electrolytic machining platform are acquired, and the short-circuit prediction model of the electrolytic machining platform deployed at the edge is used to predict the real-time voltage waveform data to obtain the short-circuit prediction probability. Based on the operating conditions, short-circuit prediction probability, and short-circuit threshold range of the electrolytic machining platform, protection measures are implemented for the electrolytic machining platform.
2. The method for short-circuit prediction and protection in electrolytic machining according to claim 1, characterized in that, The method of generating pre-short-circuit voltage waveform datasets for different operating conditions using the gap active modulation method includes: The electrolytic machining platform, which includes a z-axis module and a piezoelectric displacement platform, is controlled using a third-order motion curve. The single reciprocating motion of the electrolytic machining platform during control is sampled by STM32 using DMA dual buffer to obtain voltage signal data. The voltage signal data is normalized to obtain the pre-short-circuit voltage waveform dataset.
3. The method for short-circuit prediction and protection in electrolytic machining according to claim 1, characterized in that, The preprocessing of the normal voltage waveform dataset and the pre-short-circuit voltage waveform dataset to obtain training data includes: Data cleaning, data segmentation, and data labeling are performed on the normal voltage waveform dataset and the pre-short circuit voltage waveform dataset to obtain the training data, wherein the data labeling is performed according to the operating conditions.
4. The method for predicting and protecting short circuits in electrolytic machining according to claim 1, characterized in that, The step of training an electrolytic machining short-circuit prediction model using a scenario-adaptive hybrid neural network architecture based on training data includes: The training data is used to extract features through a scene-adaptive hybrid neural network architecture to obtain the first feature extraction result and scene identifier, where the scene identifier is used to represent the working scene corresponding to each feature. Based on the scene identifier, feature extraction is performed using the corresponding branch network to obtain the second feature extraction result; The first feature extraction result and the second feature extraction result are weighted and fused according to the scene identifier to obtain the fusion result. One of the fusion result and the second feature extraction result is used as the final classification input. A fully connected layer and activation function are used to classify the final input to obtain the short-circuit probability; The prediction model for short circuits in electrolytic machining is obtained by repeating the prediction process a certain number of times or by reaching the preset value of the model parameters.
5. The method for predicting and protecting short circuits in electrolytic machining according to claim 4, characterized in that, The scenario-adaptive hybrid neural network architecture includes: The system comprises a general feature extraction backbone network, a scene-specific branch network, a scene-adaptive fusion layer, and a classification output layer. The feature extraction backbone network uses 1D convolutional layers or temporal convolutional layers to extract basic features and cross-scene shared spatiotemporal features from the training data, yielding the first feature extraction result. The scene-specific branch network includes a BiLSTM branch, an Attention branch, and a Pooling branch. The BiLSTM branch extracts features from the deep small hole processing scene, the Attention branch extracts features from the cavity processing scene, and the Pooling branch extracts features from the planar processing scene, yielding the second feature extraction result. The weighted fusion layer uses the scene-adaptive fusion layer to weight and fuse the first feature extraction result, the second scene extraction result, and the scene identifier, resulting in a fusion result. The classification layer uses a fully connected layer and a Sigmoid activation function to output the short-circuit probability.
6. The method for predicting and protecting short circuits in electrolytic machining according to claim 5, characterized in that, The process of acquiring the operating conditions and real-time voltage waveform data of the electrolytic machining platform, and using an edge-deployed electrolytic machining short-circuit prediction model to predict the real-time voltage waveform data to obtain the short-circuit prediction probability, includes: The operating condition features are identified by performing operating condition feature identification on real-time voltage waveform data. The operating condition features include at least one of the following: rising edge and falling edge slope, high-level oscillation reading, low-level integral area, waveform symmetry, overshoot voltage, duty cycle deviation of planar machining, period consistency, noise energy ratio, and preset machining parameters. Determine the scenario identifier based on the correlation between operating condition characteristics and operating scenario; Based on the scene identifier and real-time voltage waveform data, the scene-specific branch network of the electrolytic machining short-circuit prediction model is selected for prediction to obtain the short-circuit prediction probability.
7. The method for predicting and protecting short circuits in electrolytic machining according to claim 6, characterized in that, The step of performing protection processing on the electrolytic machining platform based on its operating conditions, short-circuit prediction probability, and short-circuit threshold range includes: The short-circuit threshold range of the electrolytic processing platform is determined based on the short-circuit prediction probability and the operating conditions. Based on the short-circuit threshold range of the short electrolytic processing platform, a three-level safety interlocking mechanism is adopted to protect the electrolytic processing platform. The three-level safety interlocking mechanism includes dual-threshold graded response, hardware direct-through shutdown, and safety interlocking.
8. A short-circuit prediction and protection device for electrolytic machining, characterized in that, include: The first module is used to acquire a normal voltage waveform data set, and to generate pre-short-circuit voltage waveform datasets for different operating conditions using a gap active modulation method. The second module is used to perform preprocessing on the normal voltage waveform data set and the pre-short-circuit voltage waveform data set to obtain training data. The third module is used to train a scenario-adaptive hybrid neural network architecture based on the training data to obtain an electrolytic machining short-circuit prediction model. The fourth module is used to acquire the working conditions and real-time voltage waveform data of the electrolytic machining platform, and to obtain the short-circuit prediction probability from the real-time voltage waveform data using the electrolytic machining short-circuit prediction model. The fifth module is used to perform protection processing on the electrolytic machining platform based on the operating conditions, short circuit prediction probability, and short circuit threshold range of the electrolytic machining platform.
9. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the electrolytic machining short-circuit prediction and protection method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the electrolytic machining short-circuit prediction and protection method as described in any one of claims 1-7.