Electric spark machining coordinate acquisition and execution method and system
By generating an electrode machining model in a three-dimensional environment and combining it with probe measurement, the EDM error is automatically processed, solving the problems of low efficiency and large error in the existing technology, and realizing efficient and accurate EDM.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AVIC SHAANXI DONGFANG AVIATION INSTR
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-08
AI Technical Summary
Existing electrical discharge machining technology is inefficient when processing multiple electrical discharge features, relies on manual operation which causes machine tool downtime, and manual tool setting is prone to errors, making it difficult to achieve accurate mapping from virtual path to physical machine tool.
By generating an electrode processing model in a three-dimensional geometric processing environment, using a probe to measure the position of the physical workpiece, automatically changing electrodes and performing error compensation, the system achieves precise mapping and closed-loop control from virtual coordinates to physical actions.
It significantly improves processing efficiency, reduces downtime, eliminates human error, and enables continuous automated production and high-precision machining.
Smart Images

Figure CN121995848A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automatic electrical discharge machining technology, and relates to a method and system for acquiring and executing electrical discharge machining coordinates. Background Technology
[0002] Electrical discharge machining (EDM) is a metal processing technique that uses electrical energy, particularly suitable for difficult-to-machine materials and complex-shaped parts. In existing precision manufacturing fields such as aerospace and mold making, a single workpiece often contains dozens or even more EDM features, such as irregular holes and deep grooves. Current EDM processes are highly dependent on manual operation, especially when handling parts with dozens of EDM features. Each electrode change requires manual steps, including oil removal, electrode removal, electrode installation, electrode straightening using a dial indicator, electrode leveling, workpiece centering, oiling, and calibration. This results in the machine tool being idle most of the time, leading to extremely low production efficiency. Furthermore, manual tool setting and alignment are prone to reading errors. For complex holes located in deep cavities or on inclined surfaces, it is difficult for humans to visually determine the relative position of the electrode and workpiece, easily leading to tool collisions or machining position deviations. While existing CAM software can generate virtual paths, it lacks an automatic correction mechanism for physical clamping errors, making it difficult to achieve a precise closed-loop mapping from the virtual path to the physical machine tool. Summary of the Invention
[0003] In view of this, the present invention provides a method and system for acquiring and executing coordinates in electrical discharge machining, eliminating the manual tool setting step and improving machining efficiency and quality.
[0004] The technical solution adopted in this invention is: a method for acquiring and executing coordinates in electrical discharge machining, characterized by comprising the following steps:
[0005] S1. In a computing environment with three-dimensional geometry processing capabilities, the target size of the feature to be processed on the workpiece design model is obtained by taking the center of the specified reference hole on the workpiece design model as the reference zero point. The electrode design model is then modified in combination with the discharge process parameters to generate the electrode processing model. The electrode processing model is then simulated to translate along the axis of the feature to be processed within the cavity of the workpiece design model to obtain its first coordinate position for non-interference entry and its second coordinate position for processing termination.
[0006] S2. On an electrical discharge machining (EDM) machine tool, a probe is used to measure the actual center position of the physical workpiece corresponding to the specified reference hole, and the origin of the machine tool machining coordinate system is set at the actual center position to complete the mapping from the reference zero point to the physical machining zero point.
[0007] S3. After the physical electrode is automatically installed on the machine tool, control the physical electrode to make contact measurement with the fixed reference ball on the machine tool, measure the geometric deviation of the physical electrode, and write the deviation as a tool offset parameter into the CNC system.
[0008] S4. Call the CNC program containing the first coordinate position and the second coordinate position, and control the electrode to perform electrical discharge machining from the first coordinate position to the second coordinate position in the coordinate system after the physical reference mapping and the electrode error compensation correction.
[0009] Furthermore, in step S1, the discharge process parameters on which the electrode processing model is based are determined to include at least the single-sided discharge gap and the translational radius, and the compensation formula is:
[0010] Electrode machining model size = target size of the feature to be machined - 2 × (single-sided discharge gap - translation radius).
[0011] Furthermore, in step S1, the specific method for obtaining the first coordinate position is to move the electrode processing model along the axial direction of the feature to be processed, and calculate the minimum distance between the outer contour of the electrode processing model and the inner wall of the workpiece design model in real time; when the minimum distance is greater than zero and the main body of the electrode processing model has completely passed through the designated reference hole area, it is determined to be an interference-free entry position and recorded as the first coordinate position.
[0012] Furthermore, in step S2, the specific process of measuring the actual center position of the specified reference hole on the physical workpiece includes: controlling the probe to enter the hole, collecting the coordinates of no less than three points on the hole wall at at least two different depth sections, calculating the center of each section using a spatial circle fitting algorithm, and determining the central axis of the hole and the specified center coordinates as the origin of the machining coordinate system based on these center centers.
[0013] Furthermore, in step S3, after each automatic tool changer of the machine tool completes the clamping of the electrode, it automatically performs a measurement and offset calculation based on the fixed reference ball, and updates the calculated tool offset parameters, which are unique to the electrode, to the CNC system in real time.
[0014] Furthermore, after step 4 is completed, the control electrode is moved to the known position of the verification hole on the workpiece to measure the position, the measured coordinates are compared with the theoretical coordinates, and the deviation obtained from the comparison is used to dynamically compensate for the machining coordinates that have not yet been executed.
[0015] An automatic coordinate acquisition and execution system for electrical discharge machining (EDM), used to implement the method according to any one of claims 1 to 6, characterized in that it comprises:
[0016] The coordinate acquisition module runs in a computing environment with three-dimensional geometry processing capabilities. It is used to obtain the target size of the feature to be processed on the workpiece design model with the center of the specified reference hole on the workpiece design model as the reference zero point, and to modify the electrode design model in combination with the discharge process parameters to generate the electrode processing model. It also obtains the first coordinate position of the electrode processing model without interference and the second coordinate position of the processing termination by simulating the translation of the electrode processing model along the axis of the feature to be processed in the cavity of the workpiece design model.
[0017] The machine tool hardware subsystem includes the EDM machine body, the probe mounted on the machine tool spindle, the automatic tool changer, and the fixed reference ball fixed on the machine tool worktable;
[0018] The physical mapping module is communicatively connected to the machine tool hardware subsystem. It is used to control the probe to measure the actual center position of the physical workpiece corresponding to the specified reference hole, and to set the origin of the machine tool machining coordinate system at the actual center position to complete the mapping from the reference zero point to the physical machining zero point.
[0019] The error compensation module is used to control the physical electrode to make contact measurement with the fixed reference ball after the automatic tool changer completes the replacement of the physical electrode, measure the geometric deviation of the physical electrode, and write the deviation as a tool offset parameter into the CNC system.
[0020] The CNC execution module is used to call a CNC program containing the first coordinate position and the second coordinate position, and control the electrode to perform electrical discharge machining in a coordinate system with the origin determined by the physical mapping module and the tool offset parameter set by the error compensation module.
[0021] The beneficial effects of this invention are as follows: By obtaining coordinates through simulation, the risk of electrode interference in complex internal cavities is eliminated in advance, solving the problem of not being able to intuitively set the tool during blind hole machining. Through physical reference mapping and automatic closed-loop compensation of electrode errors, workpiece clamping errors and electrode installation errors are eliminated, achieving precise implementation from virtual coordinates to physical actions. A large amount of coordinate acquisition work is transferred to the computer, and the machine tool only needs to perform automated calibration and machining, significantly reducing downtime and enabling continuous automated production. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the structure of the workpiece and the features to be processed in an embodiment of the present invention;
[0023] Figure 2 yes Figure 1 AA section view;
[0024] Figure 3 yes Figure 1 Top view;
[0025] Figure 4 yes Figure 3 BB section view;
[0026] Figure 5 This is a schematic diagram of virtual coordinate acquisition position 1 in an embodiment of the present invention;
[0027] Figure 6 This is a schematic diagram of virtual coordinate acquisition position 2 in an embodiment of the present invention;
[0028] Figure 7 This is a schematic diagram showing the relationship between the four centering positions of the electrode model and the workpiece model in an embodiment of the present invention.
[0029] In the diagram: 1. Workpiece, 2. Main control hole, 3. EDM hole, 4. Communication hole, 5. Electrode. Detailed Implementation
[0030] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] like Figures 1-4 As shown, the workpiece to be machined contains a main control hole that serves as a designated reference hole, and an inclined EDM hole that serves as a feature to be machined.
[0032] The first step is to obtain the target size of the feature to be processed on the workpiece design model by taking the center of the specified reference hole on the workpiece design model as the reference zero point in a computing environment with three-dimensional geometry processing capabilities. The electrode design model is then modified in combination with the discharge process parameters to generate the electrode processing model. The electrode processing model is then simulated to translate along the axis of the feature to be processed into the cavity of the workpiece design model to obtain the first coordinate position of its non-interference entry and the second coordinate position of the processing termination.
[0033] Specifically, the operator imports the 3D design model of the workpiece into the CAD software. A programming coordinate system is established with the center of the main control hole on the workpiece model as the origin (X=0, Y=0, Z=0).
[0034] Subsequently, the target dimensions of the EDM hole to be processed are obtained, such as... Figure 1 In this model, the width of the EDM hole is φ6.0mm. Based on the preset discharge specifications, as shown in Table 1, taking the EDM parameters of serial number 1 as an example, the discharge gap is 0.3mm and the translational radius is 0.221mm. An electrode machining model is constructed according to the formula:
[0035] Electrode machining model size = target size of the feature to be machined - 2 × (single-sided discharge gap - translation radius)
[0036] Electrode machining model dimensions = 6.0 - 2 × (0.3 - 0.221) = 5.842.
[0037] Generate an electrode model entity with a size of 5.842 mm in CAD.
[0038]
[0039] Table 1 Electrical Discharge Parameter Recording Table
[0040] Import the electrode model into the workpiece model, aligning its axis with the axis of the EDM hole. For example... Figure 5 and Figure 6 As shown, the electrode model is translated along the axis. Using the interference check function of CAD, a position is found where the electrode just passes through the main control hole without touching the inner wall of the workpiece. The coordinates of this point (X=3.74, Y=4.17) are recorded as the first coordinate position of the intervention position. Continue translating to the bottom of the EDM hole, and record the coordinates (X=25.9, Y=-14.42) as the second coordinate position of the endpoint.
[0041] In this step, based on the target dimensions of the feature to be machined, a physical model of the electrode is constructed by subtracting the preset discharge gap and electrode translation radius. The electrode movement path is then verified using the interference check function in the CAD software. Since electrical discharge machining (EDM) is a blind machining process, and a discharge gap must be reserved in actual machining, directly programming according to the design dimensions on the drawing without compensation will lead to overcutting. Furthermore, the complex internal cavity environment makes it impossible to directly observe the relative position of the electrode and the non-machined surface, making collisions highly likely. The above steps effectively avoid the risk of physical interference and ensure that the generated coordinates and electrode dimensions accurately meet the final design accuracy requirements.
[0042] The second step involves automatically changing the physical electrode on the machine tool, controlling the physical electrode to make contact with the fixed reference ball on the machine tool, measuring the geometric deviation of the physical electrode, and writing the deviation into the CNC system as a tool offset parameter.
[0043] Specifically, the workpiece to be processed is clamped onto the machine tool. The machine tool can then activate the probe to perform an automatic centering operation, as follows:
[0044] 1. Control the probe to move to the approximate center position of the main control hole of the workpiece to be processed, and extend it into the main control hole for rough positioning;
[0045] 2. Control the probe to perform multi-point contact measurement at different depths within the main control hole;
[0046] 3. Centering is performed at each cross-section using a four-point method, i.e., the probe sequentially touches the hole wall along the positive X-axis, negative X-axis, positive Y-axis, and negative Y-axis. Figure 7 As shown. The mechanical coordinates of each contact point are recorded through the machine tool's CNC system;
[0047] 4. The system uses a spatial circle fitting algorithm to calculate the physical center axis and cross-sectional center coordinates of the main control hole based on the above sampling points. Finally, the system automatically assigns the physical center coordinates to the current workpiece machining coordinate system (such as G54), thereby setting the origin of the machining coordinate system as the physical center.
[0048] Because the workpiece is clamped on the machine tool at a position different from the zero point set in the CAD software. Positional deviations are unavoidable. This step uses automatic centering measurement to accurately obtain the physical center coordinates of the main control hole and set them as the origin of the workpiece coordinate system. This process establishes a precise mapping relationship between the virtual design space and the physical machining space, effectively eliminating positioning errors caused by workpiece clamping and ensuring that subsequent CNC programs can accurately act on the features to be machined. At the same time, the fully automated measurement process completely eliminates parallax and reading instability caused by traditional manual centering, ensuring the consistency of the machining datum.
[0049] The third step involves automatically changing the physical electrode on the machine tool, controlling the physical electrode to make contact with the fixed reference ball on the machine tool, measuring the geometric deviation of the physical electrode, and writing the deviation into the CNC system as a tool offset parameter.
[0050] Specifically, the machine tool program calls the Automatic Tool Change (ATC) command to grab the physical electrode and load it into the spindle. Then, the control electrode moves to above a fixed reference sphere on the worktable. The electrode contacts the reference sphere along the X, Y, and Z directions. The system compares the difference between the electrode contact point and the standard center of the reference sphere to obtain the electrode's eccentricity (ΔX, ΔY) and length difference (ΔZ), and fills these values into the CNC system.
[0051] A clearance exists between the electrode shank and the machine spindle, causing a slight random fluctuation in the electrode position after each tool change. Furthermore, different electrodes vary in length and wear, necessitating the elimination of these geometric differences through measurement. Using a constant-position standard reference sphere as a reference, contact measurement is employed to obtain the actual geometric state of the current electrode relative to the spindle center, thereby quantifying the random clamping error of the electrode. The system can automatically adapt to different electrode geometries, ensuring that subsequent machining accuracy is not affected by repeated electrode installation accuracy.
[0052] The fourth step is to call the CNC program containing the first coordinate position and the second coordinate position, and control the electrode to perform electrical discharge machining from the first coordinate position to the second coordinate position in the coordinate system after the physical reference mapping and the electrode error compensation correction.
[0053] Specifically, based on the workpiece coordinate system determined in step 2, the system automatically superimposes the tool offset parameters obtained in step 3 to control the electrode to move to the first coordinate position. Power is then turned on and the working fluid is circulated. The control electrode is then fed from the first coordinate position to the second coordinate position according to preset discharge parameters and a translational trajectory.
[0054] Only by effectively decoupling and dynamically superimposing the theoretical design trajectory with the systematic errors (mainly workpiece origin deviation) and random errors (mainly electrode geometric deviation) in the physical environment can high-precision automated control be achieved in a non-ideal physical machining environment. This method ultimately realizes fully automated closed-loop machining, with seamless connection between data flow and action flow throughout the entire process, requiring no manual intervention, effectively avoiding human error, and significantly improving machining efficiency and product consistency.
[0055] As a further optimization, after the machining is completed in step 4, the control electrode is moved to the known verification hole on the workpiece to measure the position. The measured coordinates are compared with the theoretical coordinates, and the deviation obtained from the comparison is used to dynamically compensate for the machining coordinates that have not yet been executed.
[0056] Specifically, after machining some features on the workpiece, or between two machining cycles, the machine tool control electrode moves to the communication hole on the workpiece, which serves as a verification hole. The electrode performs a rapid contact measurement to obtain the current actual center coordinates of the verification hole. The system compares the measured coordinates with the theoretical coordinates. If the calculated deviation exceeds a preset threshold, such as 0.01mm, the system will automatically compensate for the deviation to the origin of the coordinate system of the feature to be machined later.
[0057] This is because electrical discharge machining (EDM) typically lasts for several hours, and the prolonged discharge heat can cause thermal elongation of the machine tool leadscrew or slight displacement of the workpiece. Traditional machining methods cannot detect and eliminate these systematic errors that accumulate over time. The above verification effectively overcomes the impact of workpiece deformation on accuracy during machining, ensuring a high degree of consistency in accuracy between the first and last machining features over long machining cycles.
[0058] This embodiment also provides an electrical discharge machining system for implementing the above method. The system mainly consists of the following functional modules:
[0059] Coordinate Acquisition Module: An industrial computer or workstation with 3D graphics processing capabilities. This module runs specific 3D CAD / CAM simulation software. Its core function is to import the workpiece design model and electrode design model, automatically generate the electrode machining model based on the set discharge process parameters (discharge gap, translation radius), and extract the first and second coordinate positions without interference through an interference check algorithm in a virtual simulation environment, finally outputting a CNC machining program containing the above coordinate data.
[0060] The machine tool hardware subsystem includes a CNC EDM machine body equipped with an automatic tool changer (ATC), a high-precision 3D trigger probe mounted on the machine tool spindle, and a precision reference ball fixedly mounted at a specific position on the machine tool table. As the physical execution terminal of the system, it is responsible for carrying the workpiece, performing measurement actions, and completing the final EDM task.
[0061] Physical mapping and error compensation module: A dedicated program integrated into the machine tool's CNC system. It controls the probe to perform centering, acquires the physical center of the workpiece's main control hole, and automatically writes the coordinates of this center into the machine tool's workpiece coordinate system register, completing the mapping from the virtual zero point to the physical zero point. Furthermore, after each ATC tool change, it acquires the geometric deviation of the electrode relative to the reference sphere and automatically writes this deviation value into the system, achieving dynamic compensation for electrode errors.
[0062] The CNC execution module, acting as the servo control center of the machine tool, is responsible for parsing the code program generated by the coordinate acquisition module. It can call the origin of the workpiece coordinate system after physical mapping and the tool offset parameters after error compensation in real time, drive the servo motors of each axis of the machine tool, and control the electrodes to perform high-precision electrical discharge machining along a preset trajectory.
Claims
1. A method for acquiring and executing coordinates in electrical discharge machining (EDM), characterized in that, Includes the following steps: S1. In a computing environment with three-dimensional geometry processing capabilities, the target size of the feature to be processed on the workpiece design model is obtained by taking the center of the specified reference hole on the workpiece design model as the reference zero point. The electrode design model is then modified in combination with the discharge process parameters to generate the electrode processing model. The electrode processing model is then simulated to translate along the axis of the feature to be processed within the cavity of the workpiece design model to obtain its first coordinate position for non-interference entry and its second coordinate position for processing termination. S2. On an electrical discharge machining (EDM) machine tool, a probe is used to measure the actual center position of the physical workpiece corresponding to the specified reference hole, and the origin of the machine tool machining coordinate system is set at the actual center position to complete the mapping from the reference zero point to the physical machining zero point. S3. After the physical electrode is automatically installed on the machine tool, control the physical electrode to make contact measurement with the fixed reference ball on the machine tool, measure the geometric deviation of the physical electrode, and write the deviation as a tool offset parameter into the CNC system. S4. Call the CNC program containing the first coordinate position and the second coordinate position, and control the electrode to perform electrical discharge machining from the first coordinate position to the second coordinate position in the coordinate system after the physical reference mapping and the electrode error compensation correction.
2. The method according to claim 1, characterized in that, In step S1, the discharge process parameters on which the electrode processing model is based are determined to include at least the single-sided discharge gap and the translational radius, and the compensation formula is: Electrode machining model size = target size of the feature to be machined - 2 × (single-sided discharge gap - translation radius).
3. The method according to claim 1, characterized in that, In step S1, the specific method for obtaining the first coordinate position is to move the electrode processing model along the axial direction of the feature to be processed, and calculate the minimum distance between the outer contour of the electrode processing model and the inner wall of the workpiece design model in real time; when the minimum distance is greater than zero and the main body of the electrode processing model has completely passed through the designated reference hole area, it is determined to be an interference-free entry position and recorded as the first coordinate position.
4. The method according to claim 1, characterized in that, In step S2, the specific process of measuring the actual center position of the specified reference hole on the physical workpiece includes: controlling the probe to enter the hole, collecting the coordinates of no less than three points on the hole wall at at least two different depth sections, calculating the center of each section using a spatial circle fitting algorithm, and determining the central axis of the hole and the specified center coordinates as the origin of the machining coordinate system based on these center centers.
5. The method according to claim 1, characterized in that, In step S3, after each automatic tool changer completes the clamping of the electrode, it automatically performs a measurement and offset calculation based on the fixed reference ball, and updates the calculated tool offset parameters, which are unique to the electrode, to the CNC system in real time.
6. The method according to claim 1, characterized in that, After step 4 is completed, the control electrode is moved to the known position of the verification hole on the workpiece to measure the position. The measured coordinates are compared with the theoretical coordinates, and the deviation obtained from the comparison is used to dynamically compensate for the machining coordinates that have not yet been executed.
7. An automatic coordinate acquisition and execution system for electrical discharge machining, used to implement the method according to any one of claims 1 to 6, characterized in that, include: The coordinate acquisition module runs in a computing environment with three-dimensional geometry processing capabilities. It is used to obtain the target size of the feature to be processed on the workpiece design model with the center of the specified reference hole on the workpiece design model as the reference zero point, and to modify the electrode design model in combination with the discharge process parameters to generate the electrode processing model. It also obtains the first coordinate position of the electrode processing model without interference and the second coordinate position of the processing termination by simulating the translation of the electrode processing model along the axis of the feature to be processed in the cavity of the workpiece design model. The machine tool hardware subsystem includes the EDM machine body, the probe mounted on the machine tool spindle, the automatic tool changer, and the fixed reference ball fixed on the machine tool worktable; The physical mapping module is communicatively connected to the machine tool hardware subsystem. It is used to control the probe to measure the actual center position of the physical workpiece corresponding to the specified reference hole, and to set the origin of the machine tool machining coordinate system at the actual center position to complete the mapping from the reference zero point to the physical machining zero point. The error compensation module is used to control the physical electrode to make contact measurement with the fixed reference ball after the automatic tool changer completes the replacement of the physical electrode, measure the geometric deviation of the physical electrode, and write the deviation as a tool offset parameter into the CNC system. The CNC execution module is used to call a CNC program containing the first coordinate position and the second coordinate position, and control the electrode to perform electrical discharge machining in a coordinate system with the origin determined by the physical mapping module and the tool offset parameter set by the error compensation module.