Five-axis electric spark perforating machine in-machine measurement and processing program adaptive generation method, system and device
Patent Information
- Application Number
- CN202611294662.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-10-16
AI Technical Summary
人工找正、试打和手动修正程序的方式效率低下,并且对操作者的经验依赖程度大
(1)本申请通过零点定位快换基座保证测头与导向器基准统一,结合在机测量和刚体RT变换,同时修正孔位和孔轴方向,有效消除工件变形、装夹误差及机床回转误差,提高空间小孔的位置精度和批量加工一致性。
Smart Images

Figure CN122913587A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical discharge machining, and in particular to a method, system and equipment for adaptive generation of in-machine measurement and machining programs for a five-axis electrical discharge drilling machine. Background Technology
[0002] Electrical discharge machining (EDM) machines play a vital role in industrial manufacturing, particularly in aerospace and mold making. In the manufacturing of components such as aero-engine blades and gas turbine parts, numerous small holes need to be machined, and the quality of these holes directly impacts product performance and reliability. With continuous advancements in industrial technology, the demands for precision and efficiency in hole machining are increasing. EDM machines, with their advantages of non-contact machining and the ability to process hard and brittle materials, have become essential equipment for machining small holes. However, traditional EDM technology is gradually revealing limitations when faced with more complex workpieces and higher machining requirements.
[0003] In traditional five-axis EDM drilling, the machining program is typically generated based on a theoretical 3D model and tooling references. For machining small holes, ensuring machining quality requires precise determination of the hole inlet position, hole axis direction, and guide orientation. However, in actual production, workpieces often suffer from casting deformation, heat treatment deformation, clamping errors, fixture repeatability errors, and machine tool rotation axis errors, leading to deviations between the theoretical hole position and the actual workpiece position. To address this issue, existing methods mostly rely on manual alignment, trial drilling, and manual program correction. Alternatively, offline inspection on a coordinate measuring machine (CMM) followed by manual data rewriting for compensation is also used. Furthermore, when using a guide to machine small holes, the guide and probe typically cannot be mounted simultaneously on the same spindle end.
[0004] These traditional methods have significant drawbacks. Manual alignment, trial runs, and manual program correction are inefficient and highly dependent on operator experience. Different operators may produce different results, affecting machining consistency. Manually writing back compensation data after offline inspection on a coordinate measuring machine (CMM) not only results in a long data transmission chain, easily introducing secondary errors, but also increases machining time costs. Furthermore, if a stable and repeatable positioning relationship cannot be guaranteed between the machining guide and the probe, measurement results cannot be reliably converted into machining compensation, leading to inaccurate hole penetration positions, poor hole wall quality, and even problems such as edge rubbing, off-center holes, or penetration failure. Summary of the Invention
[0005] The purpose of this application is to overcome the above-mentioned technical problems and provide a method, system and equipment for adaptive generation of in-machine measurement and machining programs for a five-axis EDM drilling machine.
[0006] An adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine includes the following steps: A zero-point positioning quick-change base is installed at the spindle end of a five-axis EDM drilling machine. The quick-change base is used to switchably install a contact probe assembly and a guide assembly. After installation, the contact probe assembly and the guide assembly have a consistent positioning reference. Install the contact probe assembly, control the contact probe assembly to perform on-machine detection of the theoretical reference measurement points set on the workpiece, and record the machine tool XYZBC five-axis readings corresponding to each detection point; Based on the machine tool kinematics model, the XYZBC five-axis readings of each detection point are converted into measured three-dimensional coordinates in a unified machine tool spatial coordinate system. Based on at least six theoretical reference measurement points and their corresponding measured three-dimensional coordinates, a theoretical workpiece coordinate system and a measured workpiece coordinate system are established, and the rigid body transformation relationship from the theoretical workpiece coordinate system to the measured workpiece coordinate system is solved to obtain the rotation matrix and translation vector. The theoretical hole position and hole axis direction vector in the theoretical processing data are transformed by the rotation matrix and the translation vector, respectively, to obtain the compensated actual hole position and actual hole axis direction vector. Based on the actual hole location and the actual hole axis direction vector, a five-axis inverse kinematics solution is performed to generate a compensated five-axis electrical discharge machining program.
[0007] By adopting the above technical solution, a zero-point positioning quick-change base is installed at the spindle end of the five-axis EDM drilling machine. This allows the contact probe assembly and guide assembly to have a consistent positioning reference, ensuring a stable clamping relationship between measurement and machining coordinates and reducing offline detection and manual write-back errors. The theoretical reference measurement points of the workpiece are detected on-machine and the five-axis readings are recorded, then converted into actual measured three-dimensional coordinates, accurately reflecting the actual position of the workpiece. Establishing theoretical and measured workpiece coordinate systems and solving rigid body transformation relationships allows for simultaneous correction of hole position and hole axis direction. Applying rotation matrix and translation vector transformation theory to the machining data, combined with five-axis inverse kinematics solutions to generate compensated machining programs, improves the efficiency and consistency of batch part processing. This method is suitable for machining small holes in space and can retain the original EDM process parameters, facilitating implementation in existing drilling machine control systems.
[0008] Preferably, the machine tool kinematic model is for a five-axis structure with the B-axis rotating around the Y-axis and the C-axis rotating around the Z-axis. The center of the C-axis is used as the origin of the programming coordinate system, and the XYZBC readings are converted into measured three-dimensional coordinates using the following formula: Q i =T i +R z (C i )·(ΔBC+R y (Bi )·L t ); Among them, Q i Let T be the measured three-dimensional coordinates of the i-th detection point. i =[X i ,Y i Z i ] T R represents the position of the linear axis translation. y (B i Let R be the rotation matrix about the Y-axis. z (C i Let ) be the rotation matrix about the Z-axis, ΔBC be the offset vector between the B-axis and the C-axis, and L be the rotation matrix about the Z-axis. t This is the local offset vector of the probe trigger point relative to the probe mounting reference.
[0009] By adopting the above technical solution, for a five-axis structure that rotates around the Y direction on the B axis and around the Z direction on the C axis, the XYZBC five-axis readings of each detection point can be accurately converted into measured three-dimensional coordinates under a unified machine tool space coordinate system, with the center of the C axis as the origin of the programming coordinate system. This provides an accurate data foundation for subsequently establishing the workpiece coordinate system and solving the rigid body transformation relationship.
[0010] Preferably, there are six theoretical reference measurement points. The first, second, and third reference points are located on the same theoretical reference plane and are used to determine the reference plane; the fourth and fifth reference points are used to determine the reference direction; and the sixth reference point is used to determine the origin or origin reference. The method for establishing the coordinate system of the measured workpiece is as follows: The normal vector zw of the measured reference plane is calculated from the first measured point, the second measured point, and the third measured point, that is, zw=normalize((Q2-Q1)×(Q3-Q1)); The direction vector u = Q5 - Q4 is formed by the fourth and fifth measured points. Projecting u onto the measured reference plane yields the xw direction, i.e., xw = normalize(u - (u·zw)zw); The yw direction can be obtained from the right-hand coordinate system relationship, that is, yw = zw × xw; The measured coordinate system rotation matrix is Aw = [xw yw zw]; The rotation matrix of the theoretical coordinate system is calculated from the theoretical reference point using the same method. The rigid body transformation relationship is as follows: R=Aw·Ac T ; T = Ow - R·Oc; Where Ow is the measured origin and Oc is the theoretical origin.
[0011] By adopting the above technical solution, the reference plane, reference direction and origin or origin reference can be accurately determined by using six reference measurement points. This allows for the precise establishment of the actual workpiece coordinate system and the theoretical coordinate system, and the accurate solution of rigid body transformation relationships. This helps to accurately convert theoretical machining data into compensated actual data, realize the automatic compensation and generation of machining programs, improve the machining accuracy and consistency of small holes in space, and adapt to workpiece clamping errors, casting deformation and fixture repeatability errors.
[0012] Preferably, when the number of theoretical reference measurement points is greater than six, after the initial establishment of the system, the least squares rigid body registration method is used to optimize the rotation matrix R and the translation vector T.
[0013] By adopting the above technical solution, when the number of measured points is greater than six, the least squares rigid body registration method is used to optimize the rotation matrix R and translation vector T after the initial system establishment. This can reduce the multi-point fitting residual, improve the positioning accuracy, and thus improve the processing efficiency and consistency of batch parts.
[0014] Preferably, the compensated five-axis EDM drilling program includes: Safety approach section, guide positioning section, electrical discharge machining section, tool retraction section, and hole transition section; The discharge energy, pulse parameters, flushing parameters, feed rate, and penetration detection parameters in the compensated five-axis EDM drilling program are the same as the corresponding parameters in the theoretical machining program corresponding to the theoretical machining data.
[0015] By adopting the above technical solution, the compensated processing program clearly includes each processing stage, ensuring the integrity of the processing flow; the original program process parameters remain unchanged, only the geometric coordinates and attitude data are replaced, the original discharge process parameters can be retained, and it is easy to implement in the existing drilling machine control system.
[0016] Preferably, before establishing the measured workpiece coordinate system, a point cloud preprocessing step is also included: A set of dense point clouds is collected near each theoretical benchmark measurement point. The point clouds are filtered and outliers are removed. The filtered point clouds are fitted with planes, circles, cylinders, boundary centers or feature intersections according to the benchmark type. The fitting results are used as the measured three-dimensional coordinates of the benchmark point.
[0017] By adopting the above technical solution, in the adaptive generation method of on-machine measurement and machining program of five-axis EDM drilling machine, the dense point cloud collected near each theoretical reference measurement point is filtered and outlier points are removed, which can eliminate noise and abnormal points. Then, according to the reference type, the filtered point cloud is fitted with plane, circle, cylinder, boundary center or feature intersection point, which can more accurately obtain the measured three-dimensional coordinates of the reference point, improve the measurement accuracy, and make the subsequently established measured workpiece coordinate system more accurate. Ultimately, it improves the accuracy of the compensated five-axis EDM drilling machining program, better adapts to workpiece clamping errors, casting deformation and fixture repeat positioning errors, and improves the consistency of small hole entrance position, hole axis direction and batch processing.
[0018] Preferably, it further includes a residual verification step: The theoretical benchmark measurement points are transformed by the rotation matrix R and the translation vector T to obtain the transformation points. The residual between each transformation point and the corresponding measured three-dimensional coordinates is calculated. If the maximum residual or the root mean square residual exceeds the preset threshold, a prompt message for remeasurement is issued.
[0019] By adopting the above technical solution, a residual verification step is added to the adaptive generation method of on-machine measurement and machining program for a five-axis EDM drilling machine. This allows for residual calculation between the transformed points of the theoretical reference measurement points and the measured three-dimensional coordinates. When the maximum residual or root mean square residual exceeds a preset threshold, a remeasurement prompt is issued, helping to ensure the accuracy of measurement and transformation, avoiding inaccurate machining programs due to excessive errors, and thus improving machining accuracy and product quality. Simultaneously, by installing a zero-point positioning quick-change base at the spindle end, detecting and determining the machine tool's XYZBC five-axis readings at the measurement point, converting to measured three-dimensional coordinates, establishing a coordinate system to solve rigid body transformation relationships, transforming theoretical machining data, and generating machining programs through inverse kinematics solutions, the hole position deviations caused by workpiece clamping errors, workpiece deformation, and manual alignment can be reduced, improving the efficiency and consistency of small hole machining for batch parts.
[0020] A five-axis EDM drilling machine in-machine measurement and machining program adaptive generation system includes: The zero-point positioning quick-change base is fixedly installed on the spindle end of a five-axis EDM drilling machine. It is used to switchably install contact probe assembly and guide assembly, and to ensure that both have a consistent positioning reference after installation. The contact probe assembly is used to be installed on the quick-change base in the measurement state, and to perform on-machine detection of the theoretical reference measurement points set on the workpiece according to the preset detection path, and record the machine tool XYZBC five-axis readings corresponding to each detection point. The data acquisition and conversion module is used to acquire the XYZBC five-axis readings and convert them into measured three-dimensional coordinates in a unified machine tool space coordinate system based on the machine tool kinematic model. The coordinate system establishment and RT solution module is used to establish a theoretical workpiece coordinate system and a measured workpiece coordinate system based on at least six theoretical reference measurement points and their corresponding measured three-dimensional coordinates, and to solve the rigid body transformation relationship from the theoretical workpiece coordinate system to the measured workpiece coordinate system to obtain the rotation matrix and translation vector. The program adaptive generation module is used to transform the theoretical hole position and hole axis direction vector in the theoretical machining data by applying the rotation matrix and the translation vector respectively to obtain the compensated actual hole position and actual hole axis direction vector, and to perform five-axis inverse kinematics solution based on the actual hole position and actual hole axis direction vector to generate the compensated five-axis EDM drilling program.
[0021] By adopting the above technical solutions, measurement and processing can be completed on the same five-axis drilling machine, reducing offline inspection and manual write-back errors; the quick-change base ensures the repeatability of the positioning relationship between the probe and the guide, so that the measurement results can be reliably used for processing compensation; the RT overall transformation simultaneously corrects the hole position and hole axis direction, which is suitable for machining small holes in space; the program can be automatically generated based on at least six measurements, improving the processing efficiency and consistency of batch parts; the original discharge process parameters can be retained, and only the geometric coordinates and attitude are updated, which is convenient for implementation in the existing drilling machine control system.
[0022] Preferably, the zero-point positioning quick-change base is an EROWA type quick-change interface, a pneumatic quick-change interface, a hydraulic quick-change interface, or an electromagnetic quick-change interface; the contact probe assembly is a trigger probe, a scanning probe, or a contact measuring device with a ball head.
[0023] By adopting the above technical solutions, the zero-point positioning quick-change base uses multiple types of quick-change interfaces to meet different usage scenarios and accuracy requirements, ensuring that the contact probe assembly and guide assembly have a stable and consistent positioning reference after installation; the contact probe assembly uses multiple types of probes, which can flexibly select the appropriate probe for in-machine detection according to the actual situation, improving the accuracy and adaptability of the measurement.
[0024] A five-axis electrical discharge machining (EDM) machine includes a machine tool body, X-axis, Y-axis, and Z-axis linear motion mechanisms, B-axis and C-axis rotary motion mechanisms, a CNC system, and an electrode discharge machining unit. The machine is characterized by further including an adaptive generation system for in-machine measurement and machining programs; the CNC system is used to run the adaptive generation system for in-machine measurement and machining programs.
[0025] By adopting the above technical solutions, the equipment can possess the ability to automatically compensate and generate machining programs during on-machine measurement, enabling rapid switching between measurement and machining states on the same machine tool. The measured actual workpiece position is automatically converted into a new machining program, reducing manual intervention and minimizing errors from offline inspection and manual write-back; ensuring the repeatability of the positioning relationship between the probe and the guide, making the measurement results reliably usable for machining compensation; simultaneously correcting hole position and hole axis direction, suitable for machining small holes in space; automatically generating programs based on six-point measurements or multi-point point cloud fitting, improving the efficiency and consistency of small hole machining for batch parts; and retaining the original discharge process parameters, updating only the geometric coordinates and orientation, facilitating implementation in existing drilling machine control systems.
[0026] In summary, this application includes at least one of the following beneficial technical effects: (1) This application ensures that the probe and guide are consistent by using a zero-point positioning quick-change base. Combined with on-machine measurement and rigid body RT transformation, it corrects the hole position and hole axis direction, effectively eliminating workpiece deformation, clamping error and machine tool rotation error, and improving the position accuracy of small holes and batch processing consistency.
[0027] (2) This application completes measurement, coordinate transformation, RT system establishment, automatic program compensation and generation on the same machine tool, without the need for manual alignment, trial printing or offline detection and write-back, which significantly shortens the auxiliary time, reduces the dependence on operating experience, and is suitable for rapid processing of batch parts; (3) The processing procedure after compensation in this application only updates the geometric coordinates and attitude data, while the original discharge energy, pulse parameters, flushing fluid and other process parameters are completely retained. It can be directly implemented on the existing five-axis drilling machine control system, which reduces the threshold for on-site application and the difficulty of process adjustment. Attached Figure Description
[0028] Figure 1 This is a flowchart of the adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine; Figure 2 A schematic diagram showing the switching relationship between the spindle end zero-point positioning quick-change base, guide assembly, and contact probe assembly; Figure 3 A schematic diagram of the kinematic reconstruction of rotation of the B-axis around the Y-axis and rotation of the C-axis around the Z-axis with B / C-axis offset; Figure 4 A schematic diagram of establishing a 3-2-1 workpiece coordinate system for six-point detection; Figure 5 This is a schematic diagram of the automatic generation of a compensation machining program after the theoretical hole position is transformed by RT. Detailed Implementation
[0029] The technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of this application and do not constitute a limitation on the scope of protection of this application. All other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0030] To better understand this application, the structure of the five-axis EDM drilling machine involved in this application is first defined as follows: The five-axis EDM drilling machine in this embodiment includes three linear motion axes: X-axis, Y-axis, and Z-axis, and two rotary motion axes: B-axis and C-axis. The origin of the programming coordinate system is set at the rotation center of the C-axis, the B-axis rotates around the Y-axis, and the C-axis rotates around the Z-axis. It should be understood that for machine tools with other kinematic structures (such as the B-axis rotating around the X-axis), the following formulas can be equivalently transformed according to the same kinematic principles.
[0031] An adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine, such as... Figure 1 As shown, it includes the following steps: S1. Installation and component switching of the zero-point positioning quick-change base: As attached Figure 2 As shown, a zero-point positioning quick-change base is installed on the spindle end of the five-axis EDM drilling machine. The zero-point positioning quick-change base can adopt an EROWA type quick-change interface, a pneumatic quick-change interface, a hydraulic quick-change interface, or an electromagnetic quick-change interface.
[0032] The quick-change base is used to switchably mount contact probe assemblies and guide assemblies, and to give both a consistent positioning reference after installation.
[0033] In measurement mode, the contact probe assembly is mounted to the spindle end via a quick-change base. The contact probe can be a trigger-type probe, a scanning probe, or a contact measuring device with a ball head. After installation, the system automatically calls upon pre-calibrated probe length compensation and probe radius compensation values.
[0034] In the machining state, remove the contact probe assembly and install the guide assembly onto the spindle end via the same quick-change base. The guide assembly is selected according to the diameter of the hole to be machined and the diameter of the electrode tube, and is used to guide the copper tube electrode or electrode tube to feed in a preset direction.
[0035] Since the probe assembly and the guide assembly share the same zero-point positioning quick-change base, and this base has high repeatability, the spatial positional relationship of the probe trigger point in the measurement state is consistent with the spatial positional relationship of the guide tip and the electrode exit point in the machining state. This allows subsequent measurement data to be directly and reliably used for machining compensation, fundamentally solving the problem of inconsistent reference caused by the inability to install the probe and guide simultaneously in traditional methods.
[0036] S2. Install the contact probe assembly, control the contact probe assembly to perform on-machine detection of the theoretical reference measurement points set on the workpiece according to the preset detection path, and record the machine tool XYZBC five-axis readings corresponding to each detection point.
[0037] When the contact probe is triggered at the i-th reference measurement point, the CNC system records the five-axis reading at that moment as M. i =[X i ,Y i Z i B i C i It should be noted that due to the rotation of the B-axis and C-axis, the linear axis X... i Y i Z i The reading is not equivalent to the actual position of the probe contact point in the machine tool's base coordinate system, so it is necessary to perform a three-dimensional reconstruction based on the machine tool's kinematic model.
[0038] S3. Based on the machine tool kinematics model, the XYZBC five-axis readings of each detection point are converted into measured three-dimensional coordinates under a unified machine tool spatial coordinate system.
[0039] Specifically, the machine tool kinematic model, for a five-axis structure with the B-axis rotating around the Y-axis and the C-axis rotating around the Z-axis, uses the center of the C-axis as the origin of the programming coordinate system, converting the XYZBC readings into measured three-dimensional coordinates: Figure 3 As shown, the rotation center of the C-axis is defined as the origin O of the programming coordinate system. Since the rotation centers of the B-axis and C-axis do not coincide in space, they have a fixed offset vector ΔBC = [Δx, Δy, Δz]. T This bias vector is calibrated by the manufacturer when the machine tool leaves the factory, or obtained by calibration using a laser interferometer or a standard sphere during machine tool installation and commissioning.
[0040] Simultaneously, the local offset vector of the probe trigger point relative to the probe mounting reference plane is defined as L. t =[l x ,l y ,l z ] T This vector depends on the physical dimensions of the probe assembly and is obtained by calibration using standard gauge blocks or a tool setter after the probe assembly is installed.
[0041] Let T i =[X i ,Y i Z i ] T Let R be the translation vector along the linear axis. y (B i ) is the rotation about the Y-axis of the machine tool.i The standard rotation matrix of the angle, R z (C i ) is the rotation C around the machine tool's Z-axis i The standard rotation matrix of the angle.
[0042] Then the measured three-dimensional coordinates Q of the i-th detection point in the machine tool base coordinate system i Calculate using the following formula: Q i =T i +R z (C i )·(ΔBC+R y (B i )·L t ).
[0043] The position of the probe trigger point relative to the spindle end is first rotated around the B-axis, then superimposed with a fixed offset between the B and C axes, and finally rotated with the C-axis and translated with the linear axis to its absolute position in the machine tool space. For machine tools with different kinematic chain sequences or defined positive rotation directions, equivalent matrix transformations can be performed on the calibrated positive kinematic model for adjustment.
[0044] Substituting the XYZBC readings of all six (or more) reference measurement points into the above formula one by one, a set of measured three-dimensional points {Q1, Q2, ..., Q} in a unified machine tool space coordinate system can be obtained. n} (n≥6), used for subsequent coordinate system establishment.
[0045] S4. Based on at least six theoretical reference measurement points and their corresponding measured three-dimensional coordinates, establish a theoretical workpiece coordinate system and a measured workpiece coordinate system, and solve the rigid body transformation relationship from the theoretical workpiece coordinate system to the measured workpiece coordinate system to obtain the rotation matrix and translation vector.
[0046] As attached Figure 4 As shown, the specific principle for selecting theoretical benchmark points in this embodiment is as follows: at least six theoretical benchmark (measurement) points P1 to P6 are pre-determined in software such as CAD / UG. These points are selected according to the 3-2-1 system establishment principle: The first datum point P1, the second datum point P2, and the third datum point P3 are located on the same theoretical datum plane (such as the bottom surface or large plane of the workpiece) and are used to determine the normal of the datum plane. The fourth datum point P4 and the fifth datum point P5 are located on a straight line on a certain theoretical datum edge or datum groove of the workpiece, and the direction of the line connecting them is not parallel to the normal of the datum plane. They are used to determine the datum direction. The sixth reference point P6 is located near the theoretical origin of the workpiece and is used to determine the origin or origin reference.
[0047] For irregularly shaped parts such as blades and integral bladed disks that do not have obvious large flat surfaces and straight edges, the above six reference points can be distributed on the process bosses, positioning surfaces or pre-machined reference holes of the workpiece.
[0048] The method for establishing the coordinate system of the measured workpiece is as follows: Based on the measured (3D) points Q1 to Q6 obtained through kinematic reconstruction, two vectors are formed by the first measured point Q1, the second measured point Q2, and the third measured point Q3. The normal vector zw (Z-axis direction) of the measured reference plane is calculated, i.e., zw=normalize((Q2-Q1)×(Q3-Q1)).
[0049] The direction vector u = Q5 - Q4 is formed by the fourth measured point Q4 and the fifth measured point Q5. Projecting this direction vector u onto the established measured reference plane and eliminating the normal component yields the measured X-axis direction xw, i.e., xw = normalize(u-(u·zw)zw).
[0050] The Y-axis direction yw is determined by the right-hand coordinate system rule, that is, yw = zw × xw; Therefore, the rotation matrix of the measured workpiece coordinate system is Aw=[xw, yw, zw].
[0051] Using the exact same method, the rotation matrix Ac=[xc, yc, zc] of the theoretical workpiece coordinate system is calculated from theoretical reference points P1 to P6.
[0052] Regarding the use of the sixth reference points P6 and Q6 to determine the origin, this embodiment provides three optional implementation strategies: The direct method directly uses the spatial position of the sixth measured point Q6 as the measured origin Ow, that is, the origin is directly determined by the measured point.
[0053] The projection method projects the sixth measured point Q6 along the normal vector zw onto the measured reference plane determined by Q1, Q2, and Q3, using the projected point as the measured origin Ow. This strategy can eliminate the Z-axis runout error that may exist at the sixth point during measurement.
[0054] The offset method, when the sixth point is only the origin reference point and not the theoretical origin itself, determines Ow by offsetting it on the measured reference plane according to the pre-specified positional relationship of the theoretical origin Oc on the theoretical reference plane.
[0055] Once the rotation matrix Ac of the theoretical coordinate system, the rotation matrix Aw of the measured coordinate system, the theoretical origin Oc, and the measured origin Ow are all determined, solve for the rigid body transformation from the theoretical workpiece coordinate system to the measured workpiece coordinate system: The rigid body transformation relationship is as follows: Rotation matrix R = Aw·Ac T Ac T This is the transpose of Ac; Translation vector T = Ow - R·Oc; Where R is a 3×3 rotation matrix and T is a 3×1 translation vector. Ow is the measured origin and Oc is the theoretical origin.
[0056] In another specific implementation, a point cloud preprocessing step is included before establishing the coordinate system of the measured workpiece: When the workpiece surface is curved, a cast blank surface, or prone to triggering runout during measurement, a set of dense point clouds can be collected along the normal or grid path near each theoretical reference point. The point cloud is then filtered and outliers are removed. Based on the reference type, the filtered point cloud is fitted with a plane, circle, cylinder, boundary center, or feature intersection point. The fitting result is used as the measured three-dimensional coordinates of the reference point.
[0057] Specifically, if the reference is a plane, the least squares method is used to fit the plane, and the center of the plane or a specific projection point is taken as the reference point. If the reference is a circular hole or a cylinder, fit the spatial circle or the axis of the cylinder, and take the center of the circle or the intersection of the axis as the reference point; If the reference is the edge of the boundary, fit two boundary surfaces and find the intersection line, and take a specific position on the intersection line as the reference point.
[0058] The fitting results are used as the measured three-dimensional coordinates of the reference point in subsequent system construction.
[0059] When the number of measured points is greater than six, after the initial establishment of the system using the 3-2-1 method, the least squares rigid body registration method is used to optimize the rotation matrix R and the translation vector T in order to reduce the multi-point fitting residual.
[0060] minΣi||(R·P i +T)-Q i || 2 ; This optimization can make full use of information from multiple points and reduce the impact of individual outliers on the system establishment results.
[0061] S5. Transform the theoretical hole position and hole axis direction vector in the theoretical machining data using rotation and translation matrices respectively to obtain the compensated actual hole position and actual hole axis direction vector, specifically: For any spatial aperture in the original theoretical machining program, extract its theoretical aperture inlet point coordinates p=[x,y,z]. T And the direction of the hole axis v=[i,j,k] T And, if necessary, theoretical perspectives B and C are also included.
[0062] Applying the rotation matrix R and translation vector T to the hole position and direction, we obtain the compensated hole inlet point p′ and hole axis direction v′: p′=R·p+T; v′=R·v; Since R is an orthogonal unit matrix, v′ retains the characteristics of a unit vector after transformation, ensuring the correctness of the guide's attitude calculation.
[0063] S6. Based on the actual hole location and the actual hole axis direction vector, perform five-axis inverse kinematics solution to generate a compensated five-axis EDM drilling program, specifically as follows.
[0064] Based on the compensated hole position p′ and hole axis direction v′, combined with the actual length of the guide, electrode extension, and safety distance, a five-axis inverse kinematics solution is performed to obtain the new machine tool coordinates: Angle calculation: From v′=[i′,j′,k′] T Solve for the B-axis angle B′ and the C-axis angle C′.
[0065] For a structure where B rotates around Y and C rotates around Z, the solution method is: C′=atan2(j′,i′), B′=acos(k′), and multiple solutions are optimized based on the rotation range of the machine tool.
[0066] Position determination: Subtract the translation effects caused by the C-axis rotation center offset and the B-axis rotation from p′ to obtain the coordinates of the linear axes X′, Y′, and Z′.
[0067] As attached Figure 5 As shown, the system automatically writes the solved new coordinates and orientation into the machining program. The generated machining program includes the following complete machining logic segments: The safe approach section allows for rapid movement from the previous hole position or safe plane to a safe distance above the target hole position.
[0068] The guide positioning section aligns the guide in the B′ and C′ positions, ensuring that the guide axis is aligned with the v′ direction, and feeds it to the workpiece surface a predetermined distance.
[0069] In the electrical discharge machining section, the electrode tube is servo-fed and discharged along the direction of the guide until it penetrates or reaches the predetermined depth.
[0070] In the retraction phase, the electrode tube retracts, and the guide is lifted away from the workpiece surface.
[0071] The transition section between holes moves to the safe point of the next theoretical hole position.
[0072] It should be noted that the original EDM process parameters, such as discharge energy, pulse width, pulse interval, flushing pressure, servo feed speed, and penetration detection sensitivity, are fully retained; only the geometric coordinates and attitude data are replaced. This ensures that the newly generated program corrects geometric deviations while inheriting mature discharge parameters that have been validated over a long period of time, greatly reducing the barrier to entry for on-site process personnel.
[0073] In another specific implementation, the system automatically performs accuracy verification after the RT transform is completed: Each theoretical benchmark measurement point P i After transformation by rotation matrix R and translation vector T, the transformation point Pi′=R·P is obtained. i +T, calculate the coordinates of each transformation point and its corresponding measured 3D coordinates Q. i The residual d between i =||P i ′-Q i ||; The system presets the following judgment thresholds (configurable): Maximum residual threshold: d max ≤0.05mm (for precision machining scenarios); Root mean square residual threshold: RMS≤0.02mm.
[0074] If any residual exceeds the preset threshold, the system will issue a prompt to remeasure, providing the specific reference point number where the deviation exceeds the limit, guiding the operator to: check if the probe is securely installed, check the quick-change base locking status, clean burrs from the workpiece surface, or re-probe. If the residual meets the threshold, the system will allow the machining program to automatically generate steps.
[0075] This embodiment integrates all the above steps and provides a complete operation process from workpiece clamping to final machining completion, so as to facilitate understanding and implementation by on-site operators.
[0076] S1: Workpiece clamping. Install the aero-engine blade or integral bladed disk workpiece to be processed onto the machine tool worktable fixture, and confirm that the fixture is locked and the workpiece is in a safe and interference-free state.
[0077] S2: Install the probe. Install the contact probe assembly on the quick-change base at the spindle end. Call the probe calibration macro program through the CNC system to automatically load probe length compensation and radius compensation, and verify that the probe signal is normal.
[0078] S3: Data Import. Import the process file generated by the CAD software, which includes the coordinates of theoretical reference points (at least six), theoretical hole positions, hole axis directions, and the original five-axis machining program, into the machine tool's CNC system via USB flash drive, Ethernet, or DNC direct transfer. The discharge parameters in the original process file remain unchanged.
[0079] S4: In-machine detection. The CNC system sequentially controls the probe to move to the positions of each theoretical reference measurement point and executes the triggered measurement according to the preset detection path. After each measurement point is triggered and stabilized, the system automatically records the machine tool's XYZBC five-axis readings at that moment and stores them in the system variable array.
[0080] S5: Coordinate Restoration. Following the kinematic model, substitute the XYZBC data recorded in step S4 into formula Q one by one. i =T i +R z (C i )·(ΔBC+R y (B i )·L t The three-dimensional measured coordinates of the set were calculated.
[0081] S6: Establishing the coordinate system and solving the RT problem. Following the 3-2-1 method, a theoretical coordinate system is established from the theoretical reference point, and a measured coordinate system is established from the measured 3D points. Oc and Ow are obtained based on the origin determination strategy, and finally, R and T are calculated. If there are more than six measurement points, least squares optimization is performed.
[0082] S7: Data Transformation. A global transformation is performed on all theoretical aperture points p and aperture axis direction vector v: p′=R·p+T, v′=R·v. The transformed data is then subjected to five-axis inverse kinematics to obtain the new XYZBC coordinates.
[0083] S8: Program Generation and Safety Check. The system automatically replaces the old coordinates and orientation in the original program with the new XYZBC coordinates, retains all discharge process parameters, and generates a compensated machining program. Subsequently, software simulation or no-load running checks are performed to confirm that the new program does not exceed the travel limits of each axis of the machine tool and that there is no risk of interference between the spindle, fixture, or workpiece.
[0084] S9: Replace the guide. Remove the contact probe assembly, select a guide assembly that matches the diameter of the hole to be machined, and install it on the quick-change base. Confirm that the guide assembly is installed and locked in place using the locking mechanism of the quick-change base.
[0085] S10: Automatic Machining. The compensated machining program generated in step S8 is invoked, and the electrical discharge machining (EDM) is initiated. Since the guide has been automatically aligned according to the compensated posture, the electrode tube will enter the workpiece along the actual hole axis, completing a high-quality through-hole machining process. For batch production, steps S1 and S4 through S10 only need to be repeated after changing the workpiece to maintain consistent machining quality.
[0086] A five-axis EDM drilling machine in-machine measurement and machining program adaptive generation system includes: The zero-point positioning quick-change base is fixedly installed on the spindle end of a five-axis EDM drilling machine. It is used to switchably install contact probe assembly and guide assembly, and to ensure that both have a consistent positioning reference after installation. The contact probe assembly is used to install on the quick-change base in the measurement state, and controls the contact probe assembly to perform on-machine detection of the theoretical reference measurement points set on the workpiece according to the preset detection path, and records the machine tool XYZBC five-axis readings corresponding to each detection point. The data acquisition and conversion module is used to acquire the XYZBC five-axis readings and convert them into measured three-dimensional coordinates in a unified machine tool space coordinate system based on the machine tool kinematic model. The coordinate system establishment and RT solution module is used to establish the theoretical workpiece coordinate system and the measured workpiece coordinate system based on at least six theoretical reference measurement points and their corresponding measured three-dimensional coordinates, and solve the rigid body transformation relationship from the theoretical workpiece coordinate system to the measured workpiece coordinate system to obtain the rotation matrix and translation vector. The program adaptive generation module is used to transform the theoretical hole position and hole axis direction vector in the theoretical machining data by applying rotation matrix and translation vector respectively to obtain the compensated actual hole position and actual hole axis direction vector. Based on the actual hole position and actual hole axis direction vector, the five-axis inverse kinematics solution is performed to generate the compensated five-axis EDM drilling program.
[0087] A five-axis electrical discharge machining (EDM) machine includes a machine tool body, X-axis, Y-axis, and Z-axis linear motion mechanisms, B-axis and C-axis rotary motion mechanisms, a CNC system, and an electrode discharge machining unit. The machine is characterized by further including a five-axis EDM machine in-machine measurement and machining program adaptive generation system. The CNC system is used to execute the five-axis EDM machine in-machine measurement and machining program adaptive generation method, or to run the five-axis EDM machine in-machine measurement and machining program adaptive generation system, to achieve automatic compensation and generation of in-machine measurement and machining programs after workpiece clamping.
[0088] The above are merely preferred embodiments of this application and do not limit the scope of this patent application. Any equivalent structural or procedural modifications made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.
Claims
1. A method for adaptive generation of in-machine measurement and machining programs for a five-axis EDM drilling machine, characterized in that, Includes the following steps: A zero-point positioning quick-change base is installed at the spindle end of a five-axis EDM drilling machine. The quick-change base is used to switchably install a contact probe assembly and a guide assembly. After installation, the contact probe assembly and the guide assembly have a consistent positioning reference. Install the contact probe assembly, control the contact probe assembly to perform on-machine detection of the theoretical reference measurement points set on the workpiece, and record the machine tool XYZBC five-axis readings corresponding to each detection point; Based on the machine tool kinematics model, the XYZBC five-axis readings of each detection point are converted into measured three-dimensional coordinates in a unified machine tool spatial coordinate system. Based on at least six theoretical reference measurement points and their corresponding measured three-dimensional coordinates, a theoretical workpiece coordinate system and a measured workpiece coordinate system are established, and the rigid body transformation relationship from the theoretical workpiece coordinate system to the measured workpiece coordinate system is solved to obtain the rotation matrix and translation vector. The theoretical hole position and hole axis direction vector in the theoretical processing data are transformed by the rotation matrix and the translation vector, respectively, to obtain the compensated actual hole position and actual hole axis direction vector. Based on the actual hole location and the actual hole axis direction vector, a five-axis inverse kinematics solution is performed to generate a compensated five-axis electrical discharge machining program.
2. The adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine according to claim 1, characterized in that: The machine tool kinematic model is designed for a five-axis structure where the B-axis rotates around the Y-axis and the C-axis rotates around the Z-axis. Using the center of the C-axis as the origin of the programming coordinate system, the XYZBC readings are converted into measured three-dimensional coordinates using the following formula: Q i =T i +R z (C i )·(ΔBC+R y (B i )·L t ); Among them, Q i Let T be the measured three-dimensional coordinates of the i-th detection point. i =[X i ,Y i Z i ] T R represents the position of the linear axis translation. y (B i Let R be the rotation matrix about the Y-axis. z (C i Let ) be the rotation matrix about the Z-axis, ΔBC be the offset vector between the B-axis and the C-axis, and L be the rotation matrix about the Z-axis. t This is the local offset vector of the probe trigger point relative to the probe mounting reference.
3. The adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine according to claim 1, characterized in that: The theoretical reference measurement points are six in total. The first, second, and third reference points are located on the same theoretical reference plane and are used to determine the reference plane; the fourth and fifth reference points are used to determine the reference direction; and the sixth reference point is used to determine the origin or origin reference. The method for establishing the coordinate system of the measured workpiece is as follows: The normal vector zw of the measured reference plane is calculated from the first measured point, the second measured point, and the third measured point, that is, zw=normalize((Q2-Q1)×(Q3-Q1)); The direction vector u = Q5 - Q4 is formed by the fourth and fifth measured points. Projecting u onto the measured reference plane yields the xw direction, i.e., xw = normalize(u - (u·zw)zw); The yw direction can be obtained from the right-hand coordinate system relationship, that is, yw = zw × xw; The measured coordinate system rotation matrix is Aw = [xw yw zw]; The rotation matrix of the theoretical coordinate system is calculated from the theoretical reference point using the same method. The rigid body transformation relationship is as follows: R=Aw·Ac T ; T = Ow - R·Oc; Where Ow is the measured origin and Oc is the theoretical origin.
4. The adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine according to claim 3, characterized in that: When the number of theoretical reference measurement points is greater than six, after the initial establishment of the system, the least squares rigid body registration method is used to optimize the rotation matrix R and the translation vector T.
5. The adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine according to claim 1, characterized in that, The compensated five-axis EDM drilling program includes: Safety approach section, guide positioning section, electrical discharge machining section, tool retraction section, and hole transition section; The discharge energy, pulse parameters, flushing parameters, feed rate, and penetration detection parameters in the compensated five-axis EDM drilling program are the same as the corresponding parameters in the theoretical machining program corresponding to the theoretical machining data.
6. The adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine according to claim 3, characterized in that, Before establishing the coordinate system of the measured workpiece, a point cloud preprocessing step is also included, specifically: A set of dense point clouds is collected near each theoretical benchmark measurement point. The point clouds are filtered and outliers are removed. The filtered point clouds are fitted with planes, circles, cylinders, boundary centers or feature intersections according to the benchmark type. The fitting results are used as the measured three-dimensional coordinates of the benchmark point.
7. The adaptive generation method for in-machine measurement and machining programs of a five-axis EDM drilling machine according to claim 1, characterized in that, Before generating the compensated processing procedure, a residual verification step is also included, specifically: The theoretical benchmark measurement points are transformed by the rotation matrix R and the translation vector T to obtain the transformation points. The residuals between each transformation point and the corresponding measured three-dimensional coordinates are calculated. If the maximum residual or the root mean square residual exceeds the preset threshold, a prompt message for remeasurement is issued.
8. A five-axis EDM drilling machine in-machine measurement and machining program adaptive generation system, characterized in that, include: The zero-point positioning quick-change base is fixedly installed on the spindle end of a five-axis EDM drilling machine. It is used to switchably install contact probe assembly and guide assembly, and to ensure that both have a consistent positioning reference after installation. The contact probe assembly is used to be installed on the quick-change base in the measurement state, and to perform on-machine detection of the theoretical reference measurement points set on the workpiece according to the preset detection path, and record the machine tool XYZBC five-axis readings corresponding to each detection point. The data acquisition and conversion module is used to acquire the XYZBC five-axis readings and convert them into measured three-dimensional coordinates in a unified machine tool space coordinate system based on the machine tool kinematic model. The coordinate system establishment and RT solution module is used to establish a theoretical workpiece coordinate system and a measured workpiece coordinate system based on at least six theoretical reference measurement points and their corresponding measured three-dimensional coordinates, and to solve the rigid body transformation relationship from the theoretical workpiece coordinate system to the measured workpiece coordinate system to obtain the rotation matrix and translation vector. The program adaptive generation module is used to transform the theoretical hole position and hole axis direction vector in the theoretical machining data by applying the rotation matrix and the translation vector respectively to obtain the compensated actual hole position and actual hole axis direction vector, and to perform five-axis inverse kinematics solution based on the actual hole position and actual hole axis direction vector to generate the compensated five-axis EDM drilling program.
9. The system according to claim 8, characterized in that: The zero-point positioning quick-change base is an EROWA type quick-change interface, a pneumatic quick-change interface, a hydraulic quick-change interface, or an electromagnetic quick-change interface; the contact probe assembly is a trigger probe, a scanning probe, or a contact measuring device with a ball head.
10. A five-axis electrical discharge machining (EDM) machine, comprising a machine tool body, X-axis, Y-axis, and Z-axis linear motion mechanisms, B-axis and C-axis rotary motion mechanisms, a CNC system, and an electrode discharge machining unit, characterized in that, The device further includes the five-axis EDM drilling machine in-machine measurement and machining program adaptive generation system as described in claim 8 or 9; the CNC system is used to run the five-axis EDM drilling machine in-machine measurement and machining program adaptive generation system.