On-machine calibration method and system for L-shaped probe
By constructing and converting spherical equations and combining the least squares method, the on-machine calibration of the L-shaped stylus is realized, which solves the problem that stylus 2D calibration cannot achieve arbitrary point calibration compensation in the prior art, and improves the measurement accuracy and application range.
Patent Information
- Application Number
- CN202411856753.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-05-06
AI Technical Summary
The 2D calibration of existing stylus cannot achieve calibration compensation for any point of the stylus, resulting in the inability to obtain accurate measurement results when measuring in inclined planes or 3D surfaces.
By constructing the spherical equation of the first sphere and converting it into a linear equation, the radius of the first sphere is obtained by solving the least squares method, and then determining the equivalent radius and the deviation of the contact point of the L-type stylus are determined, so as to realize the on-machine calibration of the L-type stylus.
It realizes accurate calibration of the L-shaped stylus, expands the application range of machine measurement, improves detection accuracy, especially in the field of precision machining, ensures the pass rate before the product is removed, reduces the rework rate and shortens the production cycle.
Smart Images

Figure CN119935039A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of on-machine measurement, and in particular relates to an on-machine calibration method and system for an L-shaped measuring needle. Background Art
[0002] The stylus is an important part of the measurement system. Its working principle is that when measuring a part, the ruby stylus ball installed at the end of the stylus contacts the workpiece to cause displacement of the internal structure of the probe, thereby causing the internal sensor to generate relevant signals. After the CNC machine tool receives the relevant signal, the motion controller sends the current coordinates to the measurement software. The software then obtains accurate coordinate values based on these coordinate data, combined with the radius of the stylus ball and the normal direction of the contact point. Due to the displacement at the time of triggering, the actual radius of the stylus ball, and the installation error, etc., it is necessary to calibrate the actual radius value of the stylus.
[0003] At present, as the application of probes in CNC machining becomes more and more extensive, the use scenarios are also increasing. It is no longer just a simple centering and compensation of the origin. Instead, the functions of the three-dimensional coordinate measuring machine are gradually being moved to the machine tool for use. There are more and more scenarios for tilted plane and curved surface detection, and the types of probes used have also expanded from simple ruby straight probes to more types. Straight probe 2D calibration can only calibrate and compensate for length and radius, and cannot achieve calibration compensation for any point of the probe, resulting in inaccurate measurement results when measuring tilted planes or 3D curved surfaces. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides an on-machine calibration method and system for an L-shaped measuring needle.
[0005] In a first aspect, the present invention provides an on-machine calibration method for an L-shaped stylus, comprising:
[0006] Construct the spherical equation of the first sphere;
[0007] Convert the spherical equation of the first sphere into a linear equation;
[0008] Input n three-dimensional coordinates into the linear equation to obtain n linear equations;
[0009] The radius of the first sphere is obtained by solving n linear equations using the least square method;
[0010] Determine the equivalent radius of the probe of the L-type probe according to the radius of the first sphere;
[0011] Get the distance from the center of the L-type probe to the center of the standard ball when the probe contacts the standard ball;
[0012] Determine the deviation of the contact point on the probe according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe;
[0013] The L-type stylus is calibrated based on the deviation of all contact points on the probe.
[0014] Optionally, constructing the spherical equation of the first sphere includes:
[0015] Construct the spherical equation expression of the first sphere:
[0016] (x) 2 +(yb) 2 +(zc) 2 =R 2 ;
[0017] Among them, (a, b, c) are the coordinates of the center of the first sphere; (x, y, z) are the coordinates of the point on the surface of the first sphere; R is the radius of the first sphere.
[0018] Optionally, converting the spherical equation of the first sphere into a linear equation comprises:
[0019] Construct an expression for a linear equation:
[0020]
[0021] Among them, d is the intermediate variable.
[0022] Optionally, determining the equivalent radius of the probe of the L-shaped probe according to the radius of the first sphere includes:
[0023] The equivalent radius r1 of the probe for an L-type stylus is calculated using the following formula:
[0024] r1=Rr;
[0025] Where r is the radius of the standard sphere.
[0026] Optionally, the deviation of the contact point on the probe is determined according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe:
[0027] The deviation Δr of the contact point on the probe is calculated according to the following formula:
[0028] Δr=LR-r1;
[0029] Where, L is the distance from the center of the probe to the center of the standard sphere; r1 is the equivalent radius of the probe of the L-type probe.
[0030] In a second aspect, the present invention provides an on-machine calibration system for an L-shaped stylus, comprising:
[0031] A construction module for constructing a spherical equation of a first sphere;
[0032] A conversion module, for converting the spherical equation of the first sphere into a linear equation;
[0033] An input module, used for inputting n three-dimensional coordinates into the linear equation to obtain n linear equations;
[0034] A solving module, used for solving n linear equations by using the least square method to obtain the radius of the first sphere;
[0035] A first determination module, used to determine the equivalent radius of the probe of the L-shaped probe according to the radius of the first sphere;
[0036] An acquisition module is used to acquire the distance from the center of the L-shaped probe to the center of the standard ball when the probe of the L-shaped probe contacts the standard ball;
[0037] A second determination module is used to determine the deviation of the contact point on the probe according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe;
[0038] Calibration module for calibrating the L-type probe according to the deviations of all contact points on the probe.
[0039] Optionally, the building blocks include:
[0040] The first building block is used to construct the spherical equation expression of the first sphere:
[0041] (xa)2+(yb)2+(zc)2=R 2 ;
[0042] Among them, (a, b, c) are the coordinates of the center of the first sphere; (x, y, z) are the coordinates of the point on the surface of the first sphere; R is the radius of the first sphere.
[0043] Optionally, the conversion module includes:
[0044] The second building block is used to construct the expression of the linear equation:
[0045]
[0046] Among them, d is the intermediate variable.
[0047] Optionally, the first determining module includes:
[0048] The first calculation unit is used to calculate the equivalent radius r1 of the probe of the L-type probe according to the following formula:
[0049] r1=Rr;
[0050] Where r is the radius of the standard sphere.
[0051] Optionally, the second determining module:
[0052] The second calculation unit is used to calculate the deviation Δr of the contact point on the probe according to the following formula:
[0053] Δr=LR-r1;
[0054] Where, L is the distance from the center of the probe to the center of the standard sphere; r1 is the equivalent radius of the probe of the L-type probe.
[0055] The present invention provides an on-machine calibration method and system for an L-type stylus. In the method, a standard ball with a known diameter and extremely accurate sphericity is used, and the stylus head of the stylus plans measurement points in a hemispherical area of the standard ball surface. The measured point coordinate data of each measurement point is obtained, and based on these data and the known standard ball diameter data, the equivalent radius of the stylus head and the compensation value of each point where the stylus head touches the standard ball are calculated. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 A schematic diagram of a flow chart of an on-machine calibration method for an L-shaped stylus provided in an embodiment of the present invention;
[0058] Figure 2 A schematic structural diagram of an on-machine calibration system for an L-shaped stylus provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0060] Example 1
[0061] like Figure 1 As shown, this embodiment provides an on-machine calibration method for an L-shaped stylus, comprising:
[0062] Step 101, constructing a spherical equation of a first sphere.
[0063] In this embodiment, the spherical equation expression of the first sphere is constructed:
[0064] (x) 2 +(yb) 2 +(zc) 2 =R 2 .
[0065] Among them, (a, b, c) are the coordinates of the center of the first sphere; (x, y, z) are the coordinates of the point on the surface of the first sphere; R is the radius of the first sphere.
[0066] Step 102: Convert the spherical equation of the first sphere into a linear equation.
[0067] In this embodiment, the expression of the linear equation is constructed:
[0068]
[0069] Among them, d is the intermediate variable.
[0070] Step 103, inputting n three-dimensional coordinates into the linear equation to obtain n linear equations.
[0071] Step 104, using the least square method to solve n linear equations to obtain the radius of the first sphere.
[0072] Step 105: determining the equivalent radius of the probe of the L-shaped probe according to the radius of the first sphere.
[0073] In this embodiment, the equivalent radius r1 of the probe of the L-shaped probe is calculated according to the following formula:
[0074] r1=Rr.
[0075] Where r is the radius of the standard sphere.
[0076] Step 106, obtaining the distance from the center of the L-shaped stylus to the center of the standard sphere when the stylus contacts the standard sphere.
[0077] Step 107 , determining the deviation of the contact point on the probe according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere, and the equivalent radius of the probe.
[0078] In this embodiment, the deviation Δr of the contact point on the probe is calculated according to the following formula:
[0079] Δr=LR-r1.
[0080] Where, L is the distance from the center of the probe to the center of the standard sphere; r1 is the equivalent radius of the probe of the L-type probe.
[0081] Step 108, calibrating the L-shaped probe according to the deviations of all contact points on the probe.
[0082] In this embodiment, an L-shaped stylus model and a standard sphere model are constructed in the QJCAM software, and the software automatically generates a radius and a 3D calibration measurement path based on the stylus and standard sphere models.
[0083] Place the standard ball in the appropriate position on the CNC machine tool, use a standard tool to find the center of the standard ball, and then input the mechanical coordinate XYZ value of the center into the coordinate origin.
[0084] Finally, start the QJCAM measurement module, automatically send the standard ball measurement program to the CNC system, and the machine tool automatically executes the program.
[0085] The on-machine calibration method of the L-type stylus provided in this embodiment uses a standard ball with a known diameter and extremely accurate sphericity, and the stylus head of the stylus plans measurement points in the hemispherical area of the standard ball surface. The measured point coordinate data of each measurement point is obtained, and based on these data and the known standard ball diameter data, the equivalent radius of the stylus head and the compensation value of each point where the stylus head touches the standard ball are calculated.
[0086] Combined with the standard ball, the errors caused by the production, assembly and installation of the stylus can be avoided, so as to obtain the accurate position of the center (center of the ball) of the L-type stylus probe, the actual radius and the 3D compensation value of each point on the probe. This not only expands the selection of stylus types for on-machine measurement, making the application range of on-machine measurement wider, but also improves the accuracy of on-machine detection, especially in the field of precision machining, ensuring the qualified rate of products before leaving the machine, thereby reducing the rework rate and shortening the production cycle.
[0087] Example 2
[0088] Based on the same inventive concept as Example 1, this example provides an on-machine calibration system for an L-type stylus. Since the principle of solving the problem by this system is similar to the aforementioned on-machine calibration method for an L-type stylus, the implementation of this system can refer to the implementation of the on-machine calibration method for an L-type stylus.
[0089] like Figure 2 As shown, the present invention provides an on-machine calibration system for an L-shaped stylus, comprising:
[0090] The construction module 10 is used to construct the spherical equation of the first sphere.
[0091] The conversion module 20 is used to convert the spherical equation of the first sphere into a linear equation.
[0092] The input module 30 is used to input n three-dimensional coordinates into the linear equation to obtain n linear equations.
[0093] The solving module 40 is used to solve n linear equations by using the least square method to obtain the radius of the first sphere.
[0094] The first determination module 50 is used to determine the equivalent radius of the probe of the L-shaped probe according to the radius of the first sphere.
[0095] The acquisition module 60 is used to acquire the distance from the center of the L-shaped stylus to the center of the standard ball when the stylus contacts the standard ball.
[0096] The second determination module 70 is used to determine the deviation of the contact point on the probe according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe.
[0097] The calibration module 80 is used to calibrate the L-shaped probe according to the deviations of all contact points on the probe.
[0098] Exemplarily, the building blocks include:
[0099] The first building block is used to construct the spherical equation expression of the first sphere:
[0100] (x) 2 +(yb) 2 +(zc) 2 =R 2 .
[0101] Among them, (a, b, c) are the coordinates of the center of the first sphere; (x, y, z) are the coordinates of the point on the surface of the first sphere; R is the radius of the first sphere.
[0102] Exemplarily, the conversion module includes:
[0103] The second building block is used to construct the expression of the linear equation:
[0104]
[0105] Among them, d is the intermediate variable.
[0106] Exemplarily, the first determining module includes:
[0107] The first calculation unit is used to calculate the equivalent radius r1 of the probe of the L-type probe according to the following formula:
[0108] r1=Rr;
[0109] Where r is the radius of the standard sphere.
[0110] Exemplarily, the second determining module:
[0111] The second calculation unit is used to calculate the deviation Δr of the contact point on the probe according to the following formula:
[0112] Δr=LR-r1;
[0113] Where, L is the distance from the center of the probe to the center of the standard sphere; r1 is the equivalent radius of the probe of the L-type probe.
[0114] For more specific working processes of the above modules, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here.
[0115] Example 3
[0116] This embodiment provides a computer device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, the steps of the on-machine calibration method of the L-type probe described in Example 1 are implemented.
[0117] For more specific details of the above method, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here.
[0118] Example 4
[0119] This embodiment provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the steps of the on-machine calibration method for the L-type probe described in Example 1 are implemented.
[0120] For more specific details of the above method, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here.
[0121] Example 5
[0122] This embodiment provides a computer program product, including computer executable instructions or a computer program. When the computer executable instructions or the computer program are executed by a processor, the steps of the on-machine calibration method of the L-type probe described in Example 1 are implemented.
[0123] For more specific details of the above method, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here.
[0124] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the systems, devices, storage media, and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0125] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0126] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0127] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0128] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0129] The present invention has been described in detail above in conjunction with specific implementations and exemplary examples, but these descriptions cannot be understood as limiting the present invention. Those skilled in the art understand that, without departing from the spirit and scope of the present invention, a variety of equivalent substitutions, modifications or improvements may be made to the technical solution of the present invention and its implementation methods, all of which fall within the scope of the present invention. The scope of protection of the present invention shall be subject to the attached claims.
Claims
1. An on-machine calibration method for an L-type stylus, characterized in that: include: Construct the spherical equation of the first sphere; Convert the spherical equation of the first sphere into a linear equation; Input n three-dimensional coordinates into the linear equation to obtain n linear equations; The radius of the first sphere is obtained by solving n linear equations using the least square method; Determine the equivalent radius of the probe of the L-type probe according to the radius of the first sphere; Get the distance from the center of the L-type probe to the center of the standard ball when the probe contacts the standard ball; Determine the deviation of the contact point on the probe according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe; The L-type stylus is calibrated based on the deviation of all contact points on the probe.
2. The on-machine calibration method of an L-shaped stylus according to claim 1, characterized in that: The step of constructing the spherical equation of the first sphere includes: Construct the spherical equation expression of the first sphere: (x-a) 2 +(y-b) 2 +(z-c) 2 =R 2 ; Among them, (a, b, c) are the coordinates of the center of the first sphere; (x, y, z) are the coordinates of the point on the surface of the first sphere; R is the radius of the first sphere.
3. The on-machine calibration method of an L-shaped stylus according to claim 2, characterized in that: The step of converting the spherical equation of the first sphere into a linear equation comprises: Construct an expression for a linear equation: Among them, d is the intermediate variable.
4. The on-machine calibration method of an L-shaped stylus according to claim 2, characterized in that: Determining the equivalent radius of the probe of the L-shaped probe according to the radius of the first sphere comprises: The equivalent radius r1 of the probe for an L-type stylus is calculated using the following formula: r1=R-r; Where r is the radius of the standard sphere.
5. The on-machine calibration method of an L-shaped stylus according to claim 2, characterized in that: The deviation of the contact point on the probe is determined according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe: The deviation Δr of the contact point on the probe is calculated according to the following formula: Δr=LR-r1; Where, L is the distance from the center of the probe to the center of the standard sphere; r1 is the equivalent radius of the probe of the L-type probe.
6. An on-machine calibration system for an L-type stylus, characterized in that: include: A construction module for constructing a spherical equation of a first sphere; A conversion module, for converting the spherical equation of the first sphere into a linear equation; An input module, used for inputting n three-dimensional coordinates into the linear equation to obtain n linear equations; A solving module, used for solving n linear equations by using the least square method to obtain the radius of the first sphere; A first determination module, used to determine the equivalent radius of the probe of the L-shaped probe according to the radius of the first sphere; An acquisition module is used to acquire the distance from the center of the L-shaped probe to the center of the standard ball when the probe of the L-shaped probe contacts the standard ball; A second determination module is used to determine the deviation of the contact point on the probe according to the distance from the center of the probe to the center of the standard sphere, the radius of the first sphere and the equivalent radius of the probe; Calibration module for calibrating the L-type probe according to the deviations of all contact points on the probe.
7. The on-machine calibration system for an L-shaped stylus according to claim 6, characterized in that: The building blocks include: The first building block is used to construct the spherical equation expression of the first sphere: (x-a) 2 +(y-b) 2 +(z-c) 2 =R 2 ; Among them, (a, b, c) are the coordinates of the center of the first sphere; (x, y, z) are the coordinates of the point on the surface of the first sphere; R is the radius of the first sphere.
8. The on-machine calibration system for an L-shaped stylus according to claim 7, characterized in that: The conversion module comprises: The second building block is used to construct the expression of the linear equation: Among them, d is the intermediate variable.
9. The on-machine calibration system for an L-shaped stylus according to claim 7, characterized in that: The first determining module comprises: The first calculation unit is used to calculate the equivalent radius r1 of the probe of the L-type probe according to the following formula: r1=R-r; Where r is the radius of the standard sphere.
10. The on-machine calibration system for an L-shaped stylus according to claim 7, characterized in that: The second determination module: The second calculation unit is used to calculate the deviation Δr of the contact point on the probe according to the following formula: Δr=LR-r1; Where, L is the distance from the center of the probe to the center of the standard sphere; r1 is the equivalent radius of the probe of the L-type probe.