Disclosure of Invention
The invention mainly solves the technical problem of overcoming the defects of the method, and provides a light beam vector deviation planning compensation method for spectrum confocal on-line measurement aiming at the requirements of high-precision and high-efficiency on-line measurement of a complex curved surface. The method adopts a compensation strategy of light beam vector deviation coarse adjustment and measurement track correction, reduces the cosine measurement error of the complex curved surface, ensures that a measurement reference point is always positioned on a measurement programming track, solves the on-machine measurement error caused by light beam direction deviation and measurement origin offset vector in non-contact coordinate detection, and improves the on-machine measurement precision of the complex curved surface profile.
The technical scheme adopted by the invention is as follows:
a light beam vector deviation planning compensation method for spectrum confocal on-line measurement comprises the steps of firstly, integrating an optical displacement sensor on an ultra-precise four-axis lathe, building a spectrum confocal on-line measurement system, selecting a measurement reference point and establishing an initial coordinate relation; then, respectively executing a light beam direction calibration program and a measurement origin offset vector calibration program, and roughly adjusting the posture of the optical displacement sensor according to the calibration result; executing the calibration procedure and the coarse adjustment process for multiple times until the light beam vector deviation is smaller than the adjustment resolution of the mechanical adjustment mechanism; then, calculating an initial scanning measurement track according to the complex curved surface profile; and finally planning measurement movement according to the final calibration result, and generating a light beam vector deviation compensation measurement program by compensating linear axis movement. The method comprises the following specific steps:
step one, establishing an initial coordinate relationship
First, the optical displacement sensor 1 is mounted on the on-machine measuring apparatus 2 having a multi-degree-of-freedom attitude precision adjustment function. The on-machine measuring device 2 comprises an optical displacement sensor jacket 2a and an attitude adjuster which are connected in sequenceA joint mechanism 2b and a mounting base 2 c. The on-machine measuring device 2 is mounted on the rotary table 3 of the ultra-precision four-axis lathe through a mounting base 2 c. The posture adjusting mechanism 2b has an X-direction linear motion adjusting knob KXY-direction linear motion adjusting knob KYA direction angle swing adjusting knob KAAnd B direction angle swing adjusting knob KB. In the technical scheme, a rotary worktable 3 is arranged on a Z-direction linear motion shaft of an ultra-precise four-shaft lathe, a main shaft 5 of the ultra-precise four-shaft lathe is arranged on an X-direction linear motion shaft, and the Y direction is determined by a right-hand screw rule; the direction A is the direction of the rotary motion around the X axis, and the direction B is the direction of the rotary motion around the Y axis.
Then, the knob K is adjusted by adjusting the linear motion in the X directionXThe straight line l of the optical axis 4 of the optical displacement sensor 1 is made to pass through the rotation axis l of the rotary table 3 approximatelyB. Adjusting knob K for moving X axis of machine tool and adjusting linear motion in Y directionYA direction angle swing adjusting knob KAAnd B direction angle swing adjusting knob KBThe straight line l of the optical axis 4 of the optical displacement sensor 1 is made to approximate the rotation axis l of the main shaft 5 of the ultra-precise four-axis latheCAnd (4) overlapping.
And establishing a measurement coordinate system SCS, a machine tool coordinate system MCS and a workpiece coordinate system WCS. Machine tool coordinate system MCS origin O of ultra-precise four-axis latheMDefined at the mechanical null point of each axis of motion. WCS origin O of workpiece coordinate systemWIs defined on the measured curved surface. Measurement coordinate system SCS origin OSDefined at the beginning of the optical displacement sensor span range, i.e., the point where the measurement reading is zero.
And selecting any point in the measuring range of the optical displacement sensor as a measuring reference point P, wherein the point is the intersection point of the measuring beam and the measured curved surface. The light beam vector deviation in the technical scheme comprises light beam direction deviation and a measurement coordinate system SCS origin OSOffset vector with respect to the rotary table 3. The beam direction is expressed as a unit vector t (t)x,ty,tz) Represents; measurement coordinate system SCS origin OSThe offset vector with respect to the rotary table 3 is represented by L (L)x,Ly,Lz) And (4) showing.
Axis of rotation l of rotary table 3
BAnd the measuring plane X
SO
SZ
SThe intersection point of (a) is O. Under the machine coordinate system MCS, the coordinate of the intersection point O is
Measurement coordinate system SCS origin O
SCoordinates of (2)
Comprises the following steps:
wherein L is
y0. Measuring the coordinates of the reference point P
Comprises the following steps:
wherein d is the reading of the optical displacement sensor, B is the rotation angle of the rotary worktable, alpha is the attitude pitching angle of the optical displacement sensor, and beta is the attitude deflection angle of the optical displacement sensor. The attitude pitch angle α and the attitude yaw angle β are calculated according to the following equations:
wherein, t1(tx,0,tz) Is a unit vector t (t)x,ty,tz) Is in the measurement plane XSOSZSThe resultant vector of (1), t2(0,0,tz) Is a unit vector t (t)x,ty,tz) Component in the Z direction.
Step two, calibrating vector deviation of light beams and roughly adjusting pose
On-machine scanning and measuring standard ball to complete unit vector t (t) of light beam directionx,ty,tz) And measuring coordinate system SCS origin OSOffset vector L (L) with respect to rotary table 3x,Ly,Lz) And (4) calibrating. The method comprises the following specific steps:
light beam direction unit vector t (t)x,ty,tz) The standard ball is obtained by scanning a plurality of section lines of the standard ball and performing fitting calculation according to actual measurement reading and machine tool coordinates. The method specifically comprises the following steps: on-machine scanning measurement of multiple section lines of the standard ball is realized by utilizing linear motion in the X direction and rotary motion of a main shaft 5 of the ultra-precision lathe, so that a calibration program is established. And synchronously reading the reading of the optical displacement sensor 1 and the coordinates of the machine tool in the measuring process, and storing the reading and the coordinates in the same calibration data file. Establishing a light beam direction unit vector solving program, adopting a nonlinear least square fitting method, and establishing an objective function according to a spherical equation:
wherein Xi、Zi、CiRespectively, measured reading diCoordinates of an X axis and a Z axis of the corresponding machine tool and a main shaft of the ultra-precision lathe; osphere_x、osphere_y、osphere_zIs the coordinate of the center of a standard sphere in the coordinate system of the machine tool, RsphereIs the standard sphere radius. Then using the calibration data file as the input of the light beam direction unit vector solving program, giving an initial value, and calculating to obtain a light beam direction unit vector t (t)x,ty,tz)。
Offset vector L (L)x,Ly,Lz) And scanning and measuring the standard ball to obtain the highest points of the standard ball in the X direction and the Z direction, and calculating the coordinate difference of the two points to obtain the highest point. The method specifically comprises the following steps: respectively scanning the standard ball along the X direction and the Z direction, wherein the measuring point when the reading of the optical displacement sensor is minimum is the highest point of the standard ball, the reading of the optical displacement sensor and the machine tool coordinate are stored, and the offset vector L (L) is solved by using the formula (5)x,Ly,Lz):
Wherein d ismin_x、dmin_zRespectively scanning and measuring the minimum reading of the optical displacement sensor along the X direction and the Z direction when the standard ball is measured; x1、Z1The coordinate of the machine tool corresponding to the minimum reading of the optical displacement sensor when the standard ball is scanned and measured along the X direction; x2、Z2The coordinate of the machine tool corresponding to the minimum reading of the optical displacement sensor when the standard ball is scanned and measured along the Z direction is obtained.
According to the calibrated unit vector t (t)x,ty,tz) Calculating the attitude pitch angle alpha and the attitude yaw angle beta of the optical displacement sensor 1 by the formula (3), and adjusting the A direction angle swing adjusting knob KAAnd B direction angle swing adjusting knob KBAnd the coarse posture adjustment of the optical displacement sensor 1 is realized. According to a calibrated bias vector L (L)x,Ly,Lz) Adjusting knob K for adjusting linear motion in X directionXThe adjustment quantity is delta x, and the measurement of the origin O of the coordinate system SCS is realizedSCoarse adjustment with respect to the position of the rotary table 3.
And executing the calibration program and the pose rough adjustment process for multiple times until the light beam vector deviation is smaller than the adjustment resolution of the mechanical adjustment mechanism. Recording the offset vector L (L)x,Ly,Lz) And the final calibration result is used as an input value of a light beam vector deviation compensation measurement motion program to realize accurate compensation in the measurement motion.
Step three, generating an initial scanning measurement track
Firstly, an in-situ measurement planning method for a high-gradient complex curved surface in patent CN110500969B is adopted, and simultaneously, the motion form of an ultra-precise four-axis lathe is combined, and a full-surface latticed scanning measurement path and a local encrypted scanning contour line of the complex curved surface are calculated under a workpiece coordinate system WCS and are used as an initial scanning measurement track. The whole surface latticed scanning measurement path and the local encryption scanning contour line of the complex curved surface are both section lines of the complex curved surface. Then, according to the obtained initial scanning measurement track, a nominal curved surface is generated through fitting, and then deviation distribution between the nominal curved surface and a design curved surface is calculated and used for controlling the density of section line distribution so as to ensure that the initial scanning measurement track can completely express the actual contour of the complex curved surface. And finally, calculating an optical axis vector n corresponding to each sampling point on the initial scanning measurement track according to the maximum allowable inclination angle of the optical displacement sensor 1, and ensuring that the normal included angle between the optical axis 4 of the optical displacement sensor 1 and the complex curved surface at each sampling point does not exceed the maximum allowable inclination angle of the optical displacement sensor 1.
Step four planning compensation
And generating a measurement motion program considering the light beam vector deviation according to each sampling point on the planned initial scanning measurement track and the optical axis vector n so as to compensate the measurement error caused by the light beam vector deviation. The method comprises the following specific steps:
firstly, establishing a measuring movement program, and deviating the light beam vector in the step two and a unit vector t (t) of the light beam directionx,ty,tz) And measuring coordinate system SCS origin OSOffset vector L (L) with respect to rotary table 3x,Ly,Lz) As input to the measuring movement program;
then, according to the motion form of the ultra-precise four-axis lathe, sampling points p on the initial scanning measurement track planned under the workpiece coordinate system WCS
i(x
i,y
i,z
i) Sampling point converted into cylindrical coordinate system
The device is used for guiding the movement of the ultra-precise four-axis lathe, and specifically comprises the following steps:
then, planConverts the optical axis vector n of (a) into a rotation angle of the rotary table. According to the initial coordinate relationship established in the step one, the rotary axis l of the rotary worktable 3BAnd the measuring plane XSOSZSCross point of (A) O (C)O,BO,XO,ZO) The instruction positions of the corresponding motion axes under the machine tool coordinate system MCS are as follows:
wherein n' is an initial optical axis vector, and the rotation angle of the initial optical axis vector corresponding to the rotary worktable is zero; l is
xzFor the intersection O and the origin O of the measurement coordinate system SCS
SIn the measuring plane X
SO
SZ
SA distance of, in particular
Gamma is a straight line OO
SThe angle with the positive direction of the X axis can be based on the bias vector L (L)
x,L
y,L
z) And (4) calculating. Therefore, the axial motion of the machine tool, which is corresponding to all the sampling points planned under the workpiece coordinate system WCS and takes the beam vector deviation into consideration, is obtained, and the measurement reference point is ensured to be always positioned on the measurement programming track by compensating X, Z the motion of two linear axes.
And finally, according to the minimum curvature radius of each point on different measured section lines, giving different on-machine scanning measuring speeds and command positions of each motion axis, creating a G command file measured on the machine, and storing the G command file as a txt file.
The invention has the beneficial effects that: the invention establishes an on-machine measurement motion compensation method considering the light beam direction of the optical sensor and the offset of the measurement origin, reduces the cosine measurement error of a complex curved surface, and avoids the actual measurement point offset caused by the offset of the measurement origin relative to the rotating shaft; the compensation strategy of light beam vector deviation rough adjustment and measurement track correction reduces the requirements on an optical sensor posture mechanical adjustment mechanism in an on-machine measurement device, realizes measurement motion track compensation through an on-machine measurement program, and can realize compensation on a software level; the method has strong universality, and can realize non-contact contour detection of the complex curved surface part on a multi-axis numerical control machine tool or a coordinate measuring machine; the method has important significance for improving the detection precision and efficiency of the complex curved surface.
Detailed Description
Specific embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 is a basic flow diagram of the present invention. The embodiment adopts a high-gradient aspheric surface as a measured object, the expression of the curved surface is as follows,
a spectrum confocal displacement sensor is integrated on an ultra-precise four-axis lathe to perform on-machine measurement of the actual profile of the complex curved surface. The range of the sensor is 1mm, the resolution is 28nm, the working distance is 10mm, and the measurement error is +/-0.25 mu m. The on-machine measurement motion compensation method for the beam vector deviation of the spectral confocal displacement sensor comprises the following specific steps of:
step one, establishing an initial coordinate relationship
First, the optical displacement sensor 1 is mounted in the on-machine measuring apparatus 2 having a multi-degree-of-freedom attitude precision adjustment function. The on-machine measuring device 2 comprises an optical displacement sensor jacket 2a, an attitude adjusting mechanism 2b and a mounting base 2c which are connected in sequence. The on-machine measuring device 2 is arranged on a rotary worktable 3 of the ultra-precise four-axis lathe. The on-machine measuring device 2 is provided with an X-direction linear motion adjusting knob KXY-direction linear motion adjusting knob KYA direction angle swing adjusting knob KAAnd B direction angle swing adjusting knob KB. In the embodiment, the rotary table 3 is mounted on a Z-direction linear motion shaft of the ultra-precise four-shaft lathe, the main shaft 5 of the ultra-precise four-shaft lathe is mounted on an X-direction linear motion shaft, and the Y direction is determined by a right-hand screw rule; the direction A is the direction of the rotary motion around the X axis, and the direction B is the direction of the rotary motion around the Y axis.
Then, the knob K is adjusted by adjusting the linear motion in the X directionXThe straight line l of the optical axis 4 of the optical displacement sensor 1 is made to pass through the rotation axis l of the rotary table 3 approximatelyB. Adjusting knob K for moving X axis of machine tool and adjusting linear motion in Y directionYA direction angle swing adjusting knob KAAnd B direction angle swing adjusting knob KBThe straight line l of the optical axis 4 of the optical displacement sensor 1 is made to approximate the rotation axis l of the main shaft 5 of the ultra-precise four-axis latheCAnd (4) overlapping.
And establishing a measurement coordinate system SCS, a machine tool coordinate system MCS and a workpiece coordinate system WCS. Machine tool coordinate system MCS origin O of ultra-precise four-axis latheMDefined at the mechanical null point of each axis of motion. WCS origin O of workpiece coordinate systemWDefined on the measured curved surface and has the coordinate OW(0,0,0). Measurement coordinate system SCS origin OSA point at the beginning of the range of the measuring range of the optical displacement sensor 1, i.e. a point at which the measurement reading d is 0, is defined. The axes of the measurement coordinate system SCS, the machine coordinate system MCS and the workpiece coordinate system WCS are aligned in the forward direction.
The middle point of the measuring range of the
optical displacement sensor 1, i.e. the point where the reading d is 0.5, is selected as the measuring reference point P, which is the intersection point of the measuring beam and the measured curved surface. The beam vector deviations described in this embodiment include beam direction deviations and measurement coordinate system SCS origin O
SOffset vector with respect to the rotary table 3. The beam direction is expressed as a unit vector t (t)
x,t
y,t
z) Represents; measurement coordinate system SCS origin O
SThe offset vector with respect to the rotary table 3 is represented by L (L)
x,L
y,L
z) And (4) showing. Axis of rotation l of rotary table 3
BAnd the measuring plane X
SO
SZ
SThe intersection point of (a) is O.Under the machine coordinate system MCS, the coordinate of the intersection point O is
Calculating the origin O of the measurement coordinate system SCS according to the formulas (1) and (2)
SCoordinates of (2)
And measuring the coordinates of the reference point P
Step two, calibrating vector deviation of light beams and roughly adjusting pose
Calibrating unit vector t (t) of light beam direction by using standard ballx,ty,tz) And measuring coordinate system SCS origin OSOffset vector L (L) with respect to rotary table 3x,Ly,Lz)。
Light beam direction unit vector t (t)x,ty,tz) Obtained by scanning the section lines of a standard sphere. Scanning measurement was performed on 3 cross-sectional lines of a standard sphere using a spectral confocal sensor. The measuring process is realized through linear motion in the X direction and rotary motion of the main shaft 5 of the ultra-precision lathe, meanwhile, a data acquisition system synchronously acquires coordinates of the lathe and readings of the sensor, a spherical equation is constructed according to measured point data, and a unit vector in the beam direction is obtained through solution. In this embodiment, 3 section lines of the standard ball are distributed on the top of the ball, the range of linear motion in the X direction is 4mm, and the rotation angles of the spindle 5 of the ultra-precision lathe are 0 °, 60 °, and 120 °, respectively. From a scaled unit vector t (t)x,ty,tz) Calculating the attitude pitch angle alpha and the attitude yaw angle beta of the optical displacement sensor 1, and adjusting the A direction angle swing adjusting knob KAAnd B direction angle swing adjusting knob KBAnd the coarse posture adjustment of the optical displacement sensor 1 is realized. Table 1 shows the unit vectors t (t) for 3 beam direction indicesx,ty,tz) The calculation result is compared with the attitude pitch angle alpha and the attitude yaw angle beta of the optical displacement sensor 1.
TABLE 13 calibration results of beam direction and attitude angle
Offset vector L (L)x,Ly,Lz) The method is obtained by scanning the highest points of the standard ball in the X direction and the Z direction and calculating according to the coordinate values of the machine tool. According to a calibrated bias vector L (L)x,Ly,Lz) Adjusting knob K for adjusting linear motion in X directionXRealizing measurement of origin O of coordinate system SCSSCoarse adjustment with respect to the position of the rotary table 3. Table 2 lists the 3 offset vectors L (L)x,Ly,Lz) The calibration result and the adjustment amount δ x.
Table 23 times beam direction calibration result and attitude angle
And executing the calibration program and the pose rough adjustment process for multiple times until the light beam vector deviation is smaller than the adjustment resolution of the mechanical adjustment mechanism. In this embodiment, the linear motion adjustment resolution of the mechanical adjustment mechanism is 5 μm, and the angle adjustment resolution is 0.5 °. Record unit vector t (t)x,ty,tz) And an offset vector L (L)x,Ly,Lz) And as an input value to the beam vector deviation compensation measurement motion program.
Step three, generating an initial scanning measurement track
Firstly, an in-situ measurement planning method for a high-gradient complex curved surface in patent CN110500969B is adopted, and simultaneously, the motion form of an ultra-precise four-axis lathe is combined, and a full-surface latticed scanning measurement path and a local encrypted scanning contour line of the complex curved surface are calculated under a workpiece coordinate system WCS and are used as an initial scanning measurement track. The whole surface latticed scanning measurement path and the local encryption scanning contour line of the complex curved surface are both section lines of the complex curved surface. And then, fitting to generate a nominal curved surface according to the obtained initial scanning measurement track, and then calculating the deviation distribution between the nominal curved surface and the designed curved surface for controlling the density of the section line distribution so as to ensure that the initial scanning measurement track can completely express the actual profile of the complex curved surface. And finally, calculating an optical axis vector n corresponding to each sampling point on the initial scanning measurement track according to the maximum allowable inclination angle of the optical displacement sensor 1, and ensuring that the normal included angle between the optical axis 4 of the optical displacement sensor 1 and the complex curved surface at each sampling point does not exceed the maximum allowable inclination angle of the optical displacement sensor 1.
Step four planning compensation
And generating a measurement motion program considering the vector deviation of the light beam according to each sampling point on the planned initial scanning measurement track and the optical axis vector n.
Firstly, establishing a measuring movement program, and setting a unit vector t (t) of the beam direction in the beam vector deviation in the step two
x,t
y,t
z) And measuring coordinate system SCS origin O
SOffset vector L (L) with respect to rotary table 3
x,L
y,L
z) As input to the measuring movement program; then, according to the motion form of the ultra-precise four-axis lathe, sampling points p on the initial scanning measurement track planned under the workpiece coordinate system WCS
i(x
i,y
i,z
i) Sampling point converted into cylindrical coordinate system
Next, the planned optical axis vector n is converted into a rotation angle of the rotating table 3. According to the formula (7), the rotation axis l of the table 3 is calculated
BAnd the measuring plane X
SO
SZ
SCross point of (A) O (C)
O,B
O,X
O,Z
O) The command positions of the corresponding motion axes are as follows:
wherein n' is an initial optical axis vector, and the rotation angle of the initial optical axis vector corresponding to the rotary table 3 is zero; l is
xzIs the intersection point O and the measurement coordinate systemSCS origin O
SIn the measuring plane X
SO
SZ
SA distance of, in particular
Gamma is a straight line OO
SThe angle with the positive direction of the X axis can be based on the bias vector L (L)
x,L
y,L
z) And (4) calculating. Therefore, the axial motion of the machine tool, which is corresponding to all the sampling points planned under the workpiece coordinate system WCS and takes the beam vector deviation into consideration, is obtained, and the measurement reference point is ensured to be always positioned on the measurement programming track by compensating X, Z the motion of two linear axes.
And finally, according to the minimum curvature radius of each point on different measured section lines, setting different on-machine scanning measurement speeds, and establishing a curvature-sampling frequency-scanning speed sampling model for guiding the rotating speed of the main shaft 5 of the ultra-precise four-shaft lathe and the movement speed of the X/Z shaft. Rotating speed V of main shaft 5 of ultra-precise four-shaft latheCMinimum radius of curvature epsilon from section lineiAnd the sampling frequency f is as follows,
where δ h is a given chord height. The moving speed V of the X/Z axis and the minimum curvature radius epsilon of the section lineiAnd the relation between the sampling frequencies is as follows,
where l is VT and T is the movement time. And finally, creating a G instruction file measured on the machine and storing the G instruction file as a txt file.
The invention realizes the light beam vector deviation planning compensation in the spectrum confocal on-line measurement and improves the non-contact on-line measurement precision of the complex curved surface.