Electrode loss compensation method in electrical discharge machining
Through multi-dimensional sensor acquisition and data cleaning technology, an electrode loss compensation strategy is constructed to solve the problems of single data and noise interference in EDM, and realize dynamic adjustment of electrode loss and efficient control of precision machining.
Patent Information
- Application Number
- CN202510688332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-10-10
AI Technical Summary
The data collection dimension in existing EDM is single and the noise interference is serious. Traditional monitoring methods cannot fully reflect the dynamic changes of the machining environment and mechanical status. The electrode loss compensation strategy lacks quantitative analysis, resulting in insufficient machining accuracy and electrode life, long fault response time and high energy consumption.
Multi-dimensional sensors are used to collect electrical parameters, environmental parameters and mechanical parameters in real time. Combined with median filtering and interquartile range cleaning technology, a key feature database is built to monitor and dynamically adjust electrode loss in real time to achieve closed-loop control of the entire process.
It improves machining accuracy and electrode life, reduces defective products, reduces energy consumption, shortens fault response time, and realizes intelligent and efficient precision machining.
Smart Images

Figure CN120755437A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric spark machining, in particular to an electrode loss compensation method in electric spark machining. Background Art
[0002] In modern precision manufacturing, EDM (Electrodischarge Machining) (EDM), with its unique advantages as a non-contact machining platform, has demonstrated its irreplaceable role, particularly in machining high-hardness materials and complex cavities. However, current EDM technology is plagued by technical bottlenecks such as limited data acquisition dimensions and severe noise interference. Traditional monitoring methods rely solely on basic electrical parameters such as discharge current and voltage, failing to fully reflect the dynamic changes in the machining environment (such as fluid temperature / concentration / pressure) and mechanical conditions (such as feed speed / vibration frequency). Existing electrode wear compensation strategies often rely on manual threshold setting based on experience, lacking quantitative analysis of inter-parameter correlations. Traditional methods use only a single parameter to determine machining status, failing to identify the coupled effects of multiple factors such as ambient temperature fluctuations and accumulated electrode wear. Furthermore, defective product analysis often focuses on surface defect statistics, failing to establish a quantitative mapping between parameter characteristics and product quality. This empirical approach leads to delayed compensation strategy adjustments, making it difficult to adapt to complex machining conditions, ultimately impacting machining accuracy and electrode life. Existing EDM systems are commonly plagued by issues such as slow response and high energy consumption. Traditional anomaly detection relies solely on manual inspections, resulting in fault response times of tens of minutes and inability to distinguish between different anomaly types, such as electrical parameter fluctuations, sudden environmental changes, or mechanical failures. Furthermore, the lack of dynamic optimization mechanisms for adjusting key process parameters, such as electrode feed speed and pulse parameters, leads to uncontrollable electrode wear rates and persistently high machining fluid and equipment energy consumption. These issues hinder both improving machining efficiency and achieving green manufacturing goals. Summary of the Invention
[0003] The object of the present invention is to provide a method for compensating electrode loss in electrospark machining to solve the problems raised in the above background technology.
[0004] In order to solve the above technical problems, the present invention provides the following technical solution: a method for compensating electrode loss in electrospark machining, comprising the following steps:
[0005] S1: Collect data features during EDM process;
[0006] S2: Preprocess the data features to generate standard data features;
[0007] S3: Construct data groups based on data features and product labels during EDM, and integrate data groups of the same product in historical data;
[0008] S4: Compare the data sets of qualified products and defective products, analyze the key technical feature data that affects the product defect rate, and build a key feature database;
[0009] S5: During the EDM process of the product, the key technical characteristic data of the product is monitored in real time, and the electrode loss is corrected in real time.
[0010] Furthermore, in step S1, sensors are used to collect various data features during the EDM process, including N electrical parameters, M machining environment parameters, and P mechanical parameters, which are uniformly recorded as EDM data {X1, X2, ..., X N+M+P}, where {X1,X2,…,X N} are electrical parameters, including discharge current, discharge voltage, pulse width and pulse interval; {X N+1 ,X N+2 ,…,X N+M} are processing environment parameters, including processing fluid temperature, processing fluid concentration, processing fluid pressure, processing area temperature and processing area humidity; {X N+M+1 ,X N+M+2 ,…,X N+M+P} are mechanical parameters, and the machining environment parameters include electrode feed speed, machining depth, and vibration frequency. This method uses multi-dimensional sensors to collect electrical, environmental, and mechanical parameters in real time, building a sensing system that covers all machining elements and ensuring data integrity and dynamism. A combined median filter and interquartile range cleaning technique effectively suppresses noise and repairs missing data, significantly improving raw data quality. Based on characteristic frequency difference analysis of historical data on qualified and defective products, key parameters affecting product quality are accurately identified, overcoming the limitations of traditional single-factor analysis. Dynamic threshold screening and interference level assessment enable intelligent identification of key features, providing a quantitative basis for anomaly warnings. A three-level anomaly response mechanism automatically distinguishes between electrical parameter, environmental, or mechanical fault types, executing parameter self-calibration, environmental control, or equipment maintenance prompts, significantly shortening fault response time. A historical data-driven electrode loss compensation strategy dynamically adjusts feed speed and pulse parameters, extending electrode life and reducing energy consumption. Full-process closed-loop control enables intelligent and efficient production, improving product qualification rates while significantly reducing the need for manual intervention, providing reliable technical support for precision machining.
[0011] Furthermore, in step S2, the collected original data features {X N+M+1 ,X N+M+2 ,…,X N+M+PData is cleaned using a median filter algorithm to remove noise. An interquartile range-based method is used to identify and remove outliers, and the median is used to fill missing values. This interquartile range-based method includes: Sorting the data: Arranging the collected data in ascending order. This is the basis for subsequent analysis, ensuring that the data is in an orderly state and facilitating the determination of data values at each position; Dividing the sorted data into four equal parts, each containing 25% of the data, thus obtaining three quartiles. The first quartile is the value at the bottom 25% of the data, separating the top 25% from the bottom 25%; the second quartile, or median, is the value in the middle of the data, dividing the data into two equal parts, upper and lower; the third quartile is the value at the 75% of the data, separating the top 75% from the bottom 25%; Calculating the interquartile range: The interquartile range is the difference between the third quartile and the first quartile. It reflects the degree of dispersion of the middle 50% of the data and is an important indicator for measuring the degree of data dispersion. Compared with indicators such as the range, it is less sensitive to extreme values in the data and can more robustly describe the discrete characteristics of the data and determine the range of outliers: Usually, the boundaries of outliers are determined based on the interquartile range. Check the data one by one and identify data points that fall outside this range as outliers. For identified outliers, you can handle them according to the specific situation, such as directly deleting them, replacing them with reasonable values, or marking them specially for further analysis.
[0012] Normalize the cleaned data and use the normalization method to map the data features to 0 to 1 to generate standard data features {x N+M+1 ,x N+M+2 ,…,x N+M+P During the data cleaning stage, the median filtering algorithm can accurately remove noise, effectively protect the true characteristics of the data, and prevent noise interference from misleading subsequent analysis. Identifying and eliminating outliers based on the interquartile range can ensure the stability and reliability of the data and eliminate the influence of accidental factors. Filling missing values with the median can retain the distribution characteristics of the data to the greatest extent, making the data more complete. Normalization maps data features to the range of 0 to 1, which not only eliminates the influence of dimensions between different parameters, but also accelerates the convergence of the model and improves analysis efficiency. The standard data features generated through this processing can provide a high-quality data foundation for subsequent electrode loss compensation analysis.
[0013] In step S3, the U-type products produced in history are analyzed, and a data set is generated for the a-th qualified product. The data set of the a-th qualified product is {x (1_a) ,x (2_a) ,…,x (N+M+P_a)}, generate a data set for the b-th defective product, the data set for the b-th defective product is {y(1_b) ,y (2_b) ,…,y (N+M+P_b)}, and then establish a database of Group A for qualified products and Group B for defective products, where a = 1, 2, ..., A, and b = 1, 2, ..., B; by generating data groups for qualified and defective products in similar products produced historically, and then building corresponding databases, it is possible to comprehensively and systematically collect and organize multi-dimensional data corresponding to products of different quality levels. These data cover a wide range of information, including electrical parameters, processing environment parameters, and mechanical parameters, providing rich and targeted material for subsequent in-depth analysis. The qualified and defective product databases established based on this data provide a basis for comparative analysis of the differences in data characteristics of products of different quality levels, help accurately identify key parameters related to product quality, and thus provide strong data support for the subsequent formulation of electrode loss compensation strategies, effectively improving the scientific nature and accuracy of the entire method.
[0014] Furthermore, the d-th feature of the qualified product is extracted, d = 1, 2, ..., N + M + P, to generate the d-th feature set of A qualified products {x (d_1) ,x (d_2) ,…,x (d_A)}, extract the d-th feature of defective products, d=1,2,…,N+M+P, and generate the d-th feature set of B defective products {y (d_1) ,y (d_2) ,…,y (d_B)}, the dth feature set of statistical defective products {y (d_1) ,y (d_2) ,…,y (d_B) The number of times element α appears in} is D, then the frequency of element α appearing in the defective product characteristics is W (α_1) =D / B, the dth feature set of statistically qualified products {x (d_1) ,x (d_2) ,…,x (d_A) There are Z d elements, the number of times element α appears is C, then the frequency of element α appearing in the qualified product characteristics is W (α_2) =C / A, when W (α_2) ≤W (α_1) , it is judged that the element α has an impact on the qualified rate. When W (α_2) ≤W (α_1) When W is , the number of defective products caused by element α is large, and the influence on the qualified rate is large. Therefore, it is judged that element α has an influence on the qualified rate. (α_2) >W (α_1) , calculate the influence of element α on the qualified rate E α :
[0015]
[0016] The influence threshold E0 is set for the influence of element α on the qualified rate. α When <E0, it is judged that element α has an impact on the qualified rate. α When ≥E0, it is judged that the element α has no effect on the qualified rate, and then the d-th feature set {x (d_1) ,x (d_2) ,…,x (d_A)}, there are Z (d_1) The elements have an impact on the qualified rate, and then according to the number of elements that affect the qualified rate, the interference degree F of the dth feature on the qualified rate is calculated. d :
[0017]
[0018] Set the interference threshold F0, when F d ≥F0, the dth feature is judged to be the key technical feature data. d When <F0, the feature item d is judged to be non-critical technical feature data;
[0019] Substitute d=1,2,…,N+M+P one by one, and get the E key technical feature data sets for product U as {Z1,Z2,…,Z e ,…,Z E}, and then establish a database of key feature data about product U;
[0020] This step realizes the accurate identification of factors affecting quality by constructing a two-dimensional feature analysis system. First, each feature dimension of qualified products and defective products is analyzed independently, and the frequency of occurrence of each parameter value in the two types of products is counted separately. By comparing the proportion of occurrence of specific parameter values in defective products with the proportion of occurrence in qualified products, the degree of influence of the parameter value on the defective rate is quantitatively evaluated. This statistical method based on actual production data effectively overcomes the subjectivity of traditional experience judgment and makes the key feature identification more data-supported. Further, by setting reasonable thresholds, the parameter values that have a significant impact on the defective rate are screened out, and the degree of interference of each feature dimension on the product qualification rate is calculated based on the proportion of the number of these key parameter values. The key feature database finally established provides an accurate reference standard for real-time monitoring and abnormal warning of subsequent processing processes, ensuring that the system can quickly respond to parameter fluctuations and effectively reduce the probability of defective products. At the same time, it provides a scientific basis for the dynamic optimization of electrode loss compensation strategy.
[0021] In step S5, during the EDM process of the product, the key technical feature data of the product is monitored in real time, and the e-th key technical feature data of the product is monitored. When the e-th key technical feature data of any product is an element that affects the defect rate, counting is started. When the count T≥T0, it is determined that the e-th key technical feature data is abnormal, and then the EDM data X corresponding to the key technical feature data is determined. d abnormal;
[0022] When judging the EDM data X corresponding to the key technical feature data d In the event of an anomaly, the system analyzes the category of abnormal data. When N+M+P≥d>N+M, a mechanical parameter anomaly warning is issued, prompting staff to inspect production machines. When N+M≥d>N, a processing environment anomaly warning is issued, prompting staff to improve processing steps. When N≥d≥1, an electrical parameter anomaly warning is issued, and self-checks of discharge current, discharge voltage, pulse width, and pulse interval are initiated to initialize the electrical parameters. First, key technical feature data is tracked in real time, and a counting mechanism is initiated when a parameter value is detected as an abnormal element in the historical defective product feature library. By setting a reasonable threshold T0, the system can effectively distinguish between accidental fluctuations and systematic anomalies, avoiding false alarms. Second, a classification and warning mechanism based on feature dimensions significantly improves fault location efficiency: when abnormal mechanical parameter interval data is detected, an equipment maintenance prompt is immediately triggered; abnormal environmental parameter intervals trigger coordinated adjustments to the processing fluid temperature, humidity, and pressure; and when electrical parameter anomalies occur, four-parameter self-calibration is automatically performed, effectively shortening fault response time.
[0023] Compared with the prior art, the beneficial effects achieved by the present invention are: on the one hand, the real-time collection of electrical parameters, environmental parameters and mechanical parameters by multi-dimensional sensors, combined with data cleaning technologies such as median filtering and interquartile range anomaly detection, ensures the accuracy and reliability of the original data. The key feature analysis module accurately identifies the core factors affecting product quality by calculating the degree of influence and interference of each parameter on the defective rate. When an abnormality in key feature data is detected, the system immediately triggers an early warning and automatically adjusts the electrical parameters and prompts manual intervention, effectively avoiding electrode loss deviations or processing defects caused by parameter fluctuations, thereby improving the product qualification rate; on the other hand, based on the feature database established based on historical qualified and defective product data, the system can dynamically learn parameter thresholds under different working conditions. Through the key technical features screened out by the interference threshold, the system can track the changing trends of core parameters in real time. When abnormal elements are detected repeatedly, the system automatically distinguishes between electrical parameters, environmental, or mechanical fault types, and executes parameter reset, environmental control, or equipment maintenance prompts, respectively, achieving closed-loop control of the entire production process, reducing the frequency of manual inspections and shortening fault response time. Furthermore, through an electrode loss compensation strategy driven by key feature data, the system can predict electrode wear trends in advance and dynamically adjust feed speed and pulse parameters to extend electrode service life. The real-time monitoring mechanism for machining parameters reduces machining fluid waste and equipment loss caused by environmental fluctuations, reducing overall energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0025] Figure 1 It is a flow chart of the electrode loss compensation method in electrospark machining of the present invention. DETAILED DESCRIPTION
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0027] See also Figure 1 The present invention provides a technical solution: a method for compensating electrode loss in electrospark machining, comprising the following steps:
[0028] S1: Collect data features during EDM process;
[0029] S2: Preprocess the data features to generate standard data features;
[0030] S3: Construct data groups based on data features and product labels during EDM, and integrate data groups of the same product in historical data;
[0031] S4: Compare the data sets of qualified products and defective products, analyze the key technical feature data that affects the product defect rate, and build a key feature database;
[0032] S5: During the EDM process of the product, the key technical characteristic data of the product is monitored in real time, and the electrode loss is corrected in real time.
[0033] In step S1, sensors are used to collect various data features during the EDM process, including N electrical parameters, M machining environment parameters, and P mechanical parameters, which are uniformly recorded as EDM data {X1, X2, ..., X N+M+P}, where {X1,X2,…,X N} are electrical parameters, including discharge current, discharge voltage, pulse width and pulse interval; {X N+1 ,X N+2 ,…,X N+M} are processing environment parameters, including processing fluid temperature, processing fluid concentration, processing fluid pressure, processing area temperature and processing area humidity; {X N+M+1 ,X N+M+2 ,…,X N+M+P} are mechanical parameters, and the machining environment parameters include electrode feed speed, machining depth, and vibration frequency. This method uses multi-dimensional sensors to collect electrical, environmental, and mechanical parameters in real time, building a sensing system that covers all machining elements and ensuring data integrity and dynamism. A combined median filter and interquartile range cleaning technique effectively suppresses noise and repairs missing data, significantly improving raw data quality. Based on characteristic frequency difference analysis of historical data on qualified and defective products, key parameters affecting product quality are accurately identified, overcoming the limitations of traditional single-factor analysis. Dynamic threshold screening and interference level assessment enable intelligent identification of key features, providing a quantitative basis for anomaly warnings. A three-level anomaly response mechanism automatically distinguishes between electrical parameter, environmental, or mechanical fault types, executing parameter self-calibration, environmental control, or equipment maintenance prompts, significantly shortening fault response time. A historical data-driven electrode loss compensation strategy dynamically adjusts feed speed and pulse parameters, extending electrode life and reducing energy consumption. Full-process closed-loop control enables intelligent and efficient production, improving product qualification rates while significantly reducing the need for manual intervention, providing reliable technical support for precision machining.
[0034] In step S2, the collected original data features {X N+M+1 ,X N+M+2 ,…,XN+M+P} for cleaning, using the median filter algorithm to remove noise in the data, using the interquartile range-based method to identify and eliminate outliers, and using the median to fill missing values;
[0035] Normalize the cleaned data and use the normalization method to map the data features to 0 to 1 to generate standard data features {x N+M+1 ,x N+M+2 ,…,x N+M+P During the data cleaning stage, the median filtering algorithm can accurately remove noise, effectively protect the true characteristics of the data, and prevent noise interference from misleading subsequent analysis. Identifying and eliminating outliers based on the interquartile range can ensure the stability and reliability of the data and eliminate the influence of accidental factors. Filling missing values with the median can retain the distribution characteristics of the data to the greatest extent, making the data more complete. Normalization maps data features to the range of 0 to 1, which not only eliminates the influence of dimensions between different parameters, but also accelerates the convergence of the model and improves analysis efficiency. The standard data features generated through this processing can provide a high-quality data foundation for subsequent electrode loss compensation analysis.
[0036] In step S3, the U-type products produced in history are analyzed, and a data set is generated for the a-th qualified product. The data set of the a-th qualified product is {x (1_a) ,x (2_a) ,…,x (N+M+P_a)}, generate a data set for the b-th defective product, the data set for the b-th defective product is {y (1_b) ,y (2_b) ,…,y (N+M+P_b)}, and then establish a database of Group A for qualified products and Group B for defective products, where a = 1, 2, ..., A, and b = 1, 2, ..., B; by generating data groups for qualified and defective products in similar products produced historically, and then building corresponding databases, it is possible to comprehensively and systematically collect and organize multi-dimensional data corresponding to products of different quality levels. These data cover a wide range of information, including electrical parameters, processing environment parameters, and mechanical parameters, providing rich and targeted material for subsequent in-depth analysis. The qualified and defective product databases established based on this data provide a basis for comparative analysis of the differences in data characteristics of products of different quality levels, help accurately identify key parameters related to product quality, and thus provide strong data support for the subsequent formulation of electrode loss compensation strategies, effectively improving the scientific nature and accuracy of the entire method.
[0037] In step S4, the d-th feature of the qualified product is extracted, d = 1, 2, ..., N + M + P, and the d-th feature set of A qualified products {x (d_1) ,x (d_2) ,…,x (d_A)}, extract the d-th feature of defective products, d=1,2,…,N+M+P, and generate the d-th feature set of B defective products {y (d_1) ,y (d_2) ,…,y (d_B)}, the dth feature set of statistical defective products {y (d_1) ,y (d_2) ,…,y (d_B) The number of times element α appears in} is D, then the frequency of element α appearing in the defective product characteristics is W (α_1) =D / B, the dth feature set of statistically qualified products {x (d_1) ,x (d_2) ,…,x (d_A) There are Z d elements, the number of times element α appears is C, then the frequency of element α appearing in the qualified product characteristics is W (α_2) =C / A, when W (α_2) ≤W (α_1) , it is judged that the element α has an impact on the qualified rate. When W (α_2) >W (α_1) , calculate the influence of element α on the qualified rate E α :
[0038]
[0039] The influence threshold E0 is set for the influence of element α on the qualified rate. α When <E0, it is judged that element α has an impact on the qualified rate. α When ≥E0, it is judged that the element α has no effect on the qualified rate, and then the d-th feature set {x (d_1) ,x (d_2) ,…,x (d_A)}, there are Z (d_1) The elements have an impact on the qualified rate, and then according to the number of elements that affect the qualified rate, the interference degree F of the dth feature on the qualified rate is calculated. d :
[0040]
[0041] Set the interference threshold F0, when F d ≥F0, the dth feature is judged to be the key technical feature data. d When <F0, the feature item d is judged to be non-critical technical feature data;
[0042] Substitute d=1,2,…,N+M+P one by one, and get the E key technical feature data sets for product U as {Z1,Z2,…,Z e ,…,Z E}, and then establish a database of key feature data about product U;
[0043] This step realizes the accurate identification of factors affecting quality by constructing a two-dimensional feature analysis system. First, each feature dimension of qualified products and defective products is analyzed independently, and the frequency of occurrence of each parameter value in the two types of products is counted separately. By comparing the proportion of occurrence of specific parameter values in defective products with the proportion of occurrence in qualified products, the degree of influence of the parameter value on the defective rate is quantitatively evaluated. This statistical method based on actual production data effectively overcomes the subjectivity of traditional experience judgment and makes the key feature identification more data-supported. Further, by setting reasonable thresholds, the parameter values that have a significant impact on the defective rate are screened out, and the degree of interference of each feature dimension on the product qualification rate is calculated based on the proportion of the number of these key parameter values. The key feature database finally established provides an accurate reference standard for real-time monitoring and abnormal warning of subsequent processing processes, ensuring that the system can quickly respond to parameter fluctuations and effectively reduce the probability of defective products. At the same time, it provides a scientific basis for the dynamic optimization of electrode loss compensation strategy.
[0044] In step S5, during the EDM process of the product, the key technical feature data of the product is monitored in real time, and the e-th key technical feature data of the product is monitored. When the e-th key technical feature data of any product is an element that affects the defect rate, counting is started. When the count T≥T0, it is determined that the e-th key technical feature data is abnormal, and then the EDM data X corresponding to the key technical feature data is determined. d abnormal;
[0045] When judging the EDM data X corresponding to the key technical feature data d When abnormal, analyze the category of abnormal data. When N+M+P≥d>N+M, judge that the mechanical parameters cause the EDM data X d Abnormal, issue a warning of abnormal mechanical parameters, prompting staff to check the production machine; when N+M≥d>N, it is judged that the processing environment causes the EDM data X d Abnormal, issue an abnormal warning of the processing environment, prompting the staff to improve the processing link; when N≥d≥1, judge the electrical parameters causing the EDM data X dWhen an abnormality is detected, an electrical parameter abnormality warning is issued, and at the same time, self-checking of discharge current, discharge voltage, pulse width and pulse interval is started to initialize the electrical parameters. First, key technical feature data is tracked in real time, and the counting mechanism is started when a parameter value is detected to be an abnormal element in the historical defective product feature library. By setting a reasonable threshold T0, the system can effectively distinguish between accidental fluctuations and systematic abnormalities to avoid false alarms. Secondly, the classification warning mechanism based on feature dimensions significantly improves the efficiency of fault location: when abnormal data in the mechanical parameter interval is monitored, the equipment maintenance prompt is immediately triggered; when the environmental parameter interval is abnormal, the temperature, humidity and pressure of the processing fluid are linked to be adjusted; when the electrical parameters are abnormal, four-parameter self-calibration is automatically performed, which effectively shortens the fault response time.
[0046] Example 1: A precision mold manufacturing company undertook a batch of aircraft aluminum alloy blade processing tasks. These blades have high requirements for dimensional accuracy and surface quality. The company adopted electrode loss compensation technology based on multi-sensor fusion and big data analysis. The specific implementation process is as follows:
[0047] High-precision current sensors, temperature sensors, and vibration sensors are installed in key locations of the EDM equipment, such as the spindle, working fluid system, and control cabinet. During the machining process, these sensors collect various data in real time, including four electrical parameters: discharge current, discharge voltage, pulse width, and pulse interval; five machining environment parameters: machining fluid temperature, machining fluid concentration, machining fluid pressure, machining area temperature, and machining area humidity; and three mechanical parameters: electrode feed speed, machining depth, and vibration frequency, for a total of 12 parameters. This data is transmitted to the data center in real time at a frequency of 100Hz via industrial Ethernet.
[0048] The collected raw data is cleaned. A median filter algorithm is used to remove noise from mechanical parameters. For example, when there is a sudden jump in the electrode feed speed, this algorithm can effectively smooth out this noise. At the same time, an interquartile range-based method is used to identify and eliminate outliers. For example, when the machining fluid pressure data exceeds the normal range, it is considered an outlier and eliminated. For missing values, the median is used to fill in to ensure data integrity.
[0049] 200 qualified products and 50 defective products were selected from historical production of similar products to generate a corresponding database. Taking the three key features of "processing depth" as an example, statistics show that the frequency of a processing depth of 15mm in defective products is 32%, while the frequency of this situation in qualified products is only 5%. Therefore, the depth of 15mm has an impact on the pass rate;
[0050] All 12 features were calculated one by one, and finally the three features of electrode feed speed, machining fluid temperature and discharge current were determined to be the key features;
[0051] While processing the 20th blade, the system detected four consecutive discharge current values that matched historical data showing a significant impact on defect rates. The system immediately issued an electrical parameter anomaly warning and automatically triggered a self-check procedure: it closed the current discharge circuit, performed a 50ms discharge gap purge, and reinitialized the discharge parameters, adjusting the current setting from 25A to 22A. After parameter optimization, the discharge current of the next eight products processed stabilized within the 23A-24A range, improving surface roughness from 0.8μm to 0.6μm and reducing electrode wear.
[0052] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
Claims
1. A method for compensating electrode loss in electrospark machining, characterized by: The method comprises the following steps: S1: Collect data features during EDM process; S2: Preprocess the data features to generate standard data features; S3: Construct data groups based on data features and product labels during EDM, and integrate data groups of the same product in historical data; S4: Compare the data sets of qualified products and defective products, analyze the key technical feature data that affects the product defect rate, and build a key feature database; S5: During the EDM process of the product, the key technical characteristic data of the product is monitored in real time, and the electrode loss is corrected in real time.
2. The electrode loss compensation method in electric spark machining according to claim 1, characterized in that: In step S1, sensors are used to collect various data features during the EDM process, including N electrical parameters, M machining environment parameters, and P mechanical parameters, which are uniformly recorded as EDM data {X1, X2, ..., X N+M+P }, where {X1,X2,…,X N } are electrical parameters, including discharge current, discharge voltage, pulse width and pulse interval; {X N+1 ,X N+2 ,…,X N+M } are processing environment parameters, including processing fluid temperature, processing fluid concentration, processing fluid pressure, processing area temperature and processing area humidity; {X N+M+1 ,X N+M+2 ,…,X N+M+P } are mechanical parameters, and the processing environment parameters include electrode feed speed, processing depth and vibration frequency.
3. The electrode loss compensation method in electric spark machining according to claim 2, characterized in that: In step S2, the collected original data features {X N+M+1 ,X N+M+2 ,…,X N+M+P } for cleaning, using the median filter algorithm to remove noise in the data, using the interquartile range-based method to identify and eliminate outliers, and using the median to fill missing values; Normalize the cleaned data and use the normalization method to map the data features to 0 to 1 to generate standard data features {x N+M+1 ,x N+M+2 ,…,x N+M+P }.
4. The electrode loss compensation method in electric spark machining according to claim 3, characterized in that: In step S3, the U-type products produced in history are analyzed, and a data set is generated for the a-th qualified product. The data set of the a-th qualified product is {x (1_a) ,x (2_a) ,…,x (N+M+P_a) }, generate a data set for the b-th defective product, the data set for the b-th defective product is {y (1_b) ,y (2_b) ,…,y (N+M+P_b) }, and then establish a group A data set about qualified products and a group B database about defective products, where a=1,2,…,A, b=1,2,…,B.
5. The electrode loss compensation method in electric spark machining according to claim 4, characterized in that: In step S4, the d-th feature of the qualified product is extracted, d = 1, 2, ..., N + M + P, and the d-th feature set of A qualified products {x (d_1) ,x (d_2) ,…,x (d_A) }, extract the d-th feature of defective products, d=1,2,…,N+M+P, and generate the d-th feature set of B defective products {y (d_1) ,y (d_2) ,…,y (d_B) }, the dth feature set of statistical defective products {y (d_1) ,y (d_2) ,…,y (d_B) The number of times element α appears in} is D, then the frequency of element α appearing in the defective product characteristics is W (α_1) =D / B, the dth feature set of statistically qualified products {x (d_1) ,x (d_2) ,…,x (d_A) There are Z d elements, the number of times element α appears is C, then the frequency of element α appearing in the qualified product characteristics is W (α_2) =C / A, when W (α_2) ≤W (α_1) , it is judged that the element α has an impact on the qualified rate. When W (α_2) >W (α_1) , calculate the influence of element α on the qualified rate E α :
6. The electrode loss compensation method in electric spark machining according to claim 5, characterized in that: The influence threshold E0 is set for the influence of element α on the qualified rate. α When <E0, it is judged that element α has an impact on the qualified rate. α When ≥E0, it is judged that the element α has no effect on the qualified rate, and then the d-th feature set {x (d_1) ,x (d_2) ,…,x (d_A) }, there are Z (d_1) The elements have an impact on the qualified rate, and then according to the number of elements that have an impact on the qualified rate, the interference degree of the dth feature on the qualified rate is calculated, and the interference threshold F0 is set. When F d ≥F0, the dth feature is judged to be the key technical feature data. d When <F0, the feature item d is judged to be non-critical technical feature data.
7. The electrode loss compensation method in electric spark machining according to claim 6, characterized in that: Substitute d=1,2,…,N+M+P one by one, and get the E key technical feature data sets for product U as {Z1,Z2,…,Z e ,…,Z E }, and then establish a key feature data database about product U.
8. The electrode loss compensation method in electric spark machining according to claim 7, characterized in that: In step S5, during the EDM process of the product, the key technical feature data of the product is monitored in real time, and the e-th key technical feature data of the product is monitored. When the e-th key technical feature data of any product is an element that affects the defect rate, counting is started. When the count T≥T0, it is determined that the e-th key technical feature data is abnormal, and then the EDM data X corresponding to the key technical feature data is determined. d abnormal.
9. The electrode loss compensation method in electric spark machining according to claim 8, characterized in that: When judging the EDM data X corresponding to the key technical feature data d When abnormal, analyze the category of abnormal data. When N+M+P≥d>N+M, judge that the mechanical parameters cause the EDM data X d Abnormal, issue a warning of abnormal mechanical parameters, prompting staff to check the production machine; when N+M≥d>N, it is judged that the processing environment causes the EDM data X d Abnormal, issue an abnormal warning of the processing environment, prompting the staff to improve the processing link; when N≥d≥1, judge the electrical parameters causing the EDM data X d If there is an abnormality, an electrical parameter abnormality warning will be issued, and at the same time, self-checking of discharge current, discharge voltage, pulse width and pulse interval will be started to initialize the electrical parameters.