A tooth scraping machining workpiece pose error monitoring system
By combining visual acquisition with Kalman filters, high-precision quantification and dynamic compensation of workpiece pose error were achieved, solving the problem of low workpiece pose error detection efficiency in existing technologies, improving the accuracy and efficiency of gear cutting, and reducing the scrap rate.
Patent Information
- Application Number
- CN202511679575.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-11-17
AI Technical Summary
In existing gear cutting technology, the detection and processing efficiency of workpiece position and orientation errors is low, and it is difficult to accurately quantify position deviations and tilting deviations, resulting in reduced gear machining accuracy and efficiency. It is also impossible to effectively compensate for the cumulative pitch error, tooth orientation tilting error, and tooth profile tilting error caused by position and orientation errors.
A vision acquisition module is used to establish a multi-coordinate system association. Workpiece images are acquired through an industrial camera. Feature point matching and error analysis are performed by combining the ORB algorithm and Kalman filter to achieve high-precision quantification and dynamic compensation of workpiece pose. The motion control module is used to adjust the movement of the tool spindle, rotary axis and swing axis in real time to form a closed-loop control loop.
It improves the accuracy and efficiency of workpiece position error monitoring, reduces labor costs, reduces subjective errors, ensures high precision and efficiency in gear processing, and reduces scrap rate.
Smart Images

Figure CN121104756B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of workpiece pose monitoring, in particular to a gear shaving workpiece pose error monitoring system. BACKGROUND
[0002] Gear shaving technology is a new type of gear machining technology with high efficiency and high precision. The gear shaving machine structure usually contains a rotary table and a tool swing axis, and the clamping method is mainly automatic clamping. This technology has been widely used in many fields such as automobiles, energy equipment, aerospace, etc. These fields have very high requirements for the quality and performance of gears, and gear shaving process can meet the needs of high-precision gear machining. However, in the actual machining process, workpiece pose error has an important influence on gear shaving precision. Excluding the assembly error and motion error of the machine tool itself, the installation error of the workpiece is the main factor causing the workpiece pose error. During installation, the workpiece will always have position deviation and inclination deviation, which will directly affect the cumulative error of the gear pitch, the inclination error of the gear, and the inclination error of the gear profile in gear shaving, thereby reducing the machining precision of the gear and affecting its performance and reliability in the transmission system.
[0003] In the prior art, for example, the NEOPS-200 gear cutting machine of the type is used as a high-efficiency gear machining method. Its principle is to perform gear machining through the generating motion of the tool and the workpiece. It can machine external teeth, internal teeth (straight teeth, helical teeth), etc. It has the characteristics of good precision and fast efficiency, and is suitable for various gear industries such as engineering machinery internal gear ring, agricultural machinery internal gear ring, rotary support internal gear ring, wind power internal gear ring, automobile industry, speed reducer industry, RV robot speed reducer, harmonic robot speed reducer, and new energy automobile gear.
[0004] In the actual use of the gear cutting machine, there are still some limitations in the detection and processing of workpiece pose error. The operator mainly uses the onboard dial gauge to preliminarily calibrate the workpiece installation pose, and relies on manual experience to judge the pose deviation. This method not only has low efficiency, but also cannot accurately quantify the specific values of the position deviation and inclination deviation, which makes it difficult to accurately adjust the workpiece attitude during gear shaving and effectively compensate for the cumulative error of the gear pitch, the inclination error of the gear, and the inclination error of the gear profile caused by the pose error. Therefore, it is necessary to propose a gear shaving workpiece pose error monitoring system to reduce the subjective error and efficiency loss caused by manual detection, and realize real-time and accurate measurement and quantitative analysis of the workpiece pose error. SUMMARY
[0005] To solve the above problems, the present application provides a gear shaving workpiece pose error monitoring system for realizing high-precision quantitative analysis and dynamic compensation of workpiece pose error, improving gear machining precision and efficiency, reducing labor cost and scrap rate, and being suitable for high-precision gear machining in multiple fields.
[0006] To achieve the above object, the technical scheme of the present application is as follows: a workpiece pose error monitoring system for tooth machining, comprising:
[0007] a visual acquisition module, configured to establish a machine tool coordinate system and an industrial camera coordinate system, and to control the industrial camera to acquire a workpiece surface image and select feature points from the workpiece surface image to establish a workpiece coordinate system;
[0008] a coordinate system calibration module, configured to project a calibration board image on the workpiece surface, acquire a plurality of workpiece surface images containing the calibration board image at different angles, calculate an intrinsic matrix and an extrinsic matrix of the industrial camera, establish a correlation between the workpiece coordinate system and the machine tool coordinate system, and obtain coordinate system conversion parameters;
[0009] an image processing and pose calculation module, configured to perform feature point matching on the workpiece surface image, solve pose information of the workpiece coordinate system relative to the industrial camera coordinate system based on the matched feature points and the coordinate system conversion parameters, and convert the pose information to the machine tool coordinate system through the coordinate system conversion parameters to obtain actual pose information of the workpiece relative to the tool spindle;
[0010] an error analysis and feedback module, configured to calculate translational error and rotational error of the actual pose information and preset ideal pose information, generate pose error information, and predict and compensate the pose error information to output a compensation instruction;
[0011] a motion control module, configured to control the tool spindle, the rotary shaft and the swing shaft to move based on the compensation instruction, to compensate for translational error and rotational error of the workpiece, and to adjust the pose of the workpiece.
[0012] Further, the machine tool coordinate system is defined based on a numerical control system of the machine tool itself, and the industrial camera coordinate system is temporarily defined based on an optical center of the industrial camera.
[0013] Further, the visual acquisition module is configured to control a plurality of industrial cameras to acquire workpiece surface images from different angles, to obtain a plurality of workpiece surface images, and to process the workpiece surface images through a multi-view fusion algorithm.
[0014] Further, the selection of feature points from the workpiece surface image to establish the workpiece coordinate system comprises: pre-processing the workpiece surface image acquired by the industrial camera to convert a color image into a black-and-white grayscale image; identifying sharp corners and edge intersection points on the workpiece surface from the pre-processed workpiece surface image; selecting three sharp corners and edge intersection points that are not on the same straight line as reference points, taking any one of the reference points as a coordinate origin, determining X, Y and Z axes representing length, width and height directions according to the relative positional relationship among the three reference points, and establishing a workpiece coordinate system suitable for the workpiece.
[0015] Further, the visual acquisition module is configured to extract the workpiece surface image containing the calibration plate image, identify the pattern state contained in the calibration plate image, and determine that the calibration plate image is projected coplanar with the workpiece end face if the pattern distortion contained in the calibration plate image is zero, thereby completing the projection of the calibration plate image on the workpiece surface.
[0016] Further, the coordinate system calibration module is configured to calibrate and compensate the radial distortion parameters and tangential distortion parameters of the industrial camera by projecting calibration plate images of different shapes and sizes on the workpiece surface during the calculation of the intrinsic matrix and extrinsic matrix of the industrial camera.
[0017] Further, the coordinate system calibration module is configured to convert an arbitrary point in the workpiece coordinate system to a point in the industrial camera coordinate system based on the extrinsic matrix, project a three-dimensional point in the industrial camera coordinate system to a two-dimensional pixel coordinate on the image plane based on the intrinsic matrix, and convert the point in the industrial camera coordinate system to a point in the machine tool coordinate system based on the rigid conversion relationship between the machine tool coordinate system and the industrial camera coordinate system, thereby establishing the correlation between the workpiece coordinate system and the machine tool coordinate system, obtaining the conversion parameters of the workpiece coordinate system and the machine tool coordinate system, and defining the conversion parameters as the coordinate system conversion parameters.
[0018] Further, the image processing and pose calculation module is configured to extract and describe feature points of the workpiece surface image using the ORB algorithm, generate a 256-bit binary descriptor for each feature point, measure the similarity between the feature point descriptors based on the Hamming distance, match the feature points of the images under different viewing angles, and eliminate the false matching points using the bidirectional consistency check method, thereby obtaining the feature point pairs.
[0019] Further, the error analysis and feedback module is configured to predict and compensate the workpiece pose error based on the Kalman filter, including:
[0020] defining a 12-dimensional state vector containing the translational error and the translational error rate of the workpiece in the X, Y, and Z axis directions, as well as the rotational error and the rotational error rate around the X, Y, and Z axes;
[0021] constructing a state transition equation based on the dynamic change law of the workpiece pose error to predict the natural change of the error;
[0022] constructing a 6-dimensional observation equation based on the measurement capability of the industrial camera, wherein the observation equation only relates to the directly measurable translational error and rotational error, and ignores the error rate that cannot be directly measured;
[0023] The priori estimation and the priori estimation of the current moment are obtained through the prediction step, and a Kalman gain is calculated by combining the observation vector, the priori state estimation is corrected based on the Kalman gain and the measurement residual, and the posteriori state estimation is obtained;
[0024] The prediction step and the correction step are iteratively performed, and an optimal pose error estimation value is output, and the translation error and the rotation error in the optimal pose error estimation value are integrated into the pose error information.
[0025] Further, the motion control module is used for pre-adjusting the motion parameters through feedforward control according to the pre-set motion trajectories of the tool main shaft, the rotation shaft and the swing shaft and the current pose error information, and dynamically correcting the motion processes of the tool main shaft, the rotation shaft and the swing shaft by using the real-time feedback information of the closed-loop control circuit.
[0026] Compared with the prior art, the above scheme has the following beneficial effects:
[0027] 1. In the scheme, the vision acquisition module, the coordinate system calibration module and the image processing module are cooperated, the industrial camera is used for acquiring images and establishing the correlation of multiple coordinate systems, and the high-precision quantitative analysis of the workpiece pose error is realized. Compared with the traditional manual calibration method with the aid of the dial gauge, the pose error monitoring efficiency is greatly improved, the errors caused by subjective judgment are avoided, and the cumulative error of the tooth pitch, the tooth direction tilt error and the tooth profile tilt error are effectively reduced.
[0028] 2. In the scheme, the Kalman filter is introduced, the error is predicted and compensated based on the current state of the workpiece and the motion law, and the motion control strategy combining the feedforward control and the feedback control is adopted to form a closed-loop control circuit. The mechanism can dynamically adjust the actions of the tool main shaft, the rotation shaft and the swing shaft in real time, and quickly respond to the changes of the workpiece pose.
[0029] 3. In the scheme, for the workpiece that is difficult to adhere to the entity calibration plate such as the large inner gear ring and the non-planar gear, the size and shape of the calibration plate pattern can be flexibly adjusted by accurate projection, and the key machining area of the workpiece is covered. There is no need to customize entity calibration plates of multiple specifications, and the equipment cost and operation complexity are reduced. Based on the distortion of the calibration plate pattern, the coplanar condition of the projected calibration plate image and the workpiece end face is judged to ensure that the calibration plate is quickly and accurately projected to the standard position, and to provide a basis for subsequent workpiece pose error analysis. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 The system architecture diagram of the embodiment of the application is shown in the figure;
[0031] Figure 2 The structure schematic diagram of the gear cutting and milling machine of the embodiment of the application is shown in the figure;
[0032] Figure 3 The calibration plate image of the embodiment of the application is shown in the figure;
[0033] Figure 4 Fig. 1 is a schematic diagram of the tooth cutting machining workpiece pose error monitoring system according to an embodiment of the present application.
[0034] The reference signs in the drawings of the specification include: 1, rotary shaft; 2, tool spindle; 3, swing shaft; 4, workpiece. DETAILED DESCRIPTION
[0035] The technical solutions of the present application will be described clearly and completely below in combination with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0036] Embodiments such as Figure 1 and Figure 2 As shown in the figure: a tooth cutting machining workpiece pose error monitoring system mainly consists of a visual acquisition module, a coordinate system calibration module, an image processing and pose calculation module, an error analysis and feedback module, a motion control module and a camera imaging model. Workpiece pose error monitoring and compensation are carried out with the help of a rotary shaft 1 for rotating a workpiece 4, a tool spindle 2 for rotating a cutting tool and a swing shaft 3 for swinging the cutting tool. The visual acquisition module includes an industrial camera for image acquisition, which is set inside the machine tool and installed in a position to ensure stable posture and avoid measurement errors caused by vibration. In some embodiments, a linear array camera, a multispectral camera or an industrial grade CMOS image module can be used for image acquisition, which is set in the same way as the industrial camera.
[0037] Among them, the visual acquisition module is mainly used to establish the machine tool coordinate system, the industrial camera coordinate system and the workpiece coordinate system; the coordinate system calibration module is mainly used to project the calibration plate image on the surface of the workpiece 4, collect multiple sets of workpiece surface images containing the projected calibration plate image at different angles, calculate the intrinsic matrix and extrinsic matrix of the industrial camera, unify and correlate the machine tool coordinate system, the industrial camera coordinate system and the workpiece coordinate system, and obtain the coordinate system conversion parameters; the image processing and pose calculation module is mainly used to obtain the pose information of the workpiece 4 relative to the tool spindle 2 based on the feature points, the camera imaging model and the coordinate system conversion parameters; the error analysis and feedback module is mainly used to compare the pose information of the workpiece 4 relative to the tool spindle 2 with the preset ideal pose information, calculate the translation error and the rotation error, and generate the quantitative pose error information; the motion control module is mainly used to control the actions of the tool spindle 2, the rotary shaft 1 and the swing shaft 3 based on the quantitative pose error information, compensate for the translation error and the rotation error, and adjust the workpiece pose.
[0038] The modules will be described in detail below:
[0039] I. Visual acquisition module
[0040] The machine tool coordinate system and the industrial camera coordinate system are established. The machine tool coordinate system is defined based on the numerical control system of the machine tool itself, and is the reference coordinate of the machine tool and is directly obtained by the visual acquisition module. The industrial camera coordinate system is temporarily defined based on the optical center of the industrial camera.
[0041] The industrial camera is controlled to shoot the workpiece surface image, and a feature point is selected in the workpiece surface image information to establish a workpiece coordinate system. In this embodiment, the visual acquisition module defines the X, Y and Z axis directions of the machine tool coordinate system as X1, Y1 and Z1, and the origin of the established industrial camera coordinate system is located at the optical center of the industrial camera, and the X, Y and Z axis directions thereof are defined as X2, Y2 and Z2. The X2, Y2 and Z2 axis directions of the industrial camera coordinate system are consistent with the X1, Y1 and Z1 axis directions of the machine tool coordinate system. The visual acquisition module controls multiple industrial cameras to shoot the workpiece surface image from different angles, obtains multiple groups of workpiece surface images, and processes the workpiece surface images through a multi-view fusion algorithm.
[0042] In this embodiment, the specific method of the visual acquisition module for selecting a feature point in the workpiece surface image to establish a workpiece coordinate system is as follows:
[0043] Firstly, the workpiece surface image shot and obtained by the industrial camera is preprocessed, and the color image is converted into a black-and-white grayscale image to remove the noise interference in the image.
[0044] Then, the sharp corners and edge intersection points on the surface of the workpiece 4 are identified from the preprocessed workpiece surface image.
[0045] Finally, three sharp corners and edge intersection points that are not on the same straight line are selected as reference points from the identified sharp corners and edge intersection points on the surface of the workpiece 4, and any one of the reference points is taken as the coordinate origin. According to the relative positional relationship among the three reference points, the X, Y and Z axes representing the length, width and height directions are determined, which are defined as X3, Y3 and Z3, so as to establish a workpiece coordinate system suitable for the workpiece 4.
[0046] Specifically, in this embodiment, the resolution of the industrial camera is 5 million pixels, the frame rate is 60 fps, the pixel size is 3.45 μm x 3.45 μm, the workpiece surface image can be collected within 0.1 s, the shooting field of view covers the key processing area of the workpiece 4, and the detail features on the surface of the workpiece 4 at the level of ±0.01 mm are captured. During image acquisition, the image grayscale value of the industrial camera is controlled in the interval [50, 200], so as to ensure that the contrast of the collected workpiece surface image reaches more than 80%, and to avoid the loss of image features due to insufficient light and angle deviation and other factors.
[0047] In the establishment of the workpiece coordinate system, first, the workpiece surface image is pre-processed: gray processing, after the gray processing of the color image, it is converted into a single channel image data amount is reduced by about 2 / 3; 3*3 Gaussian filter template (standard deviation σ=0.8) is used for denoising, the image noise level is reduced to below 5 gray levels; the Canny edge detection algorithm is used, the high and low threshold ratio is set to 3:1 (high threshold 75, low threshold 25), the workpiece 4 surface contour edge is completely extracted, and the edge positioning accuracy is 0.5 pixels.
[0048] Feature point selection: by calculating the gray level change of the local area of the workpiece surface image, 10 corner points are detected in each square millimeter area (according to the feature density of the workpiece surface, the feature points are uniformly distributed to meet the accuracy requirements of the coordinate system establishment), the repeated detection rate of the corner points is more than 95%; then the scale space extreme value detection and key point positioning are used to extract 500 feature points with scale invariance. From the detected feature points, three non-collinear feature points are selected as reference points, preferably, the feature points of the root circle edge and the positioning hole center are selected as reference points, and the distance between the reference points is ≥50mm. Then, taking any one of the reference points as the origin, according to the geometric relationship between the reference point as the origin and other reference points, the directions of the industrial coordinate system X, Y and Z axes are determined, and the workpiece coordinate system is established. The coordinate system establishment error is controlled within ±0.05mm (translation error) and ±0.1° (rotation error). At the same time, the corresponding relationship between the machine tool coordinate system and the industrial camera coordinate system is established through at least 20 groups of calibration data in different positions, which provides a unified and high-precision coordinate reference for subsequent pose calculation.
[0049] II. Coordinate system calibration module
[0050] The workpiece 4 surface is projected with a calibration plate image, the calibration plate image is projected by controlling the DLP projector. The industrial camera is controlled to obtain multiple groups of workpiece surface images at different angles, the intrinsic matrix and the extrinsic matrix of the industrial camera are calculated based on the multiple groups of workpiece surface images at different angles, the machine tool coordinate system, the industrial camera coordinate system and the workpiece coordinate system are related, and the coordinate system conversion parameters are obtained.
[0051] Specifically, the intrinsic matrix includes focal length and principal point coordinates, and the extrinsic matrix includes rotation and translation vectors. In this embodiment, the coordinate system calibration module calculates the intrinsic matrix, the extrinsic matrix and the distortion parameters of the industrial camera by shooting at least three workpiece surface images containing the calibration plate image at different positions and angles.
[0052] In this embodiment, in the process of calculating the intrinsic matrix and the extrinsic matrix of the industrial camera, different shapes and sizes of calibration plate images are projected on the workpiece 4 surface to calibrate and compensate the radial distortion parameters and the tangential distortion parameters of the industrial camera, and the specific method is as follows:
[0053] Radial distortion model, describes the barrel or pincushion distortion caused by the curvature of the industrial camera lens, the formula is:
[0054]
[0055] In the formula, is the ideal non-distorted coordinate; is the actual distorted coordinate; ; is the radial distortion coefficient.
[0056] Tangential distortion model, describes the distortion caused by the non-parallelism between the industrial camera lens and the imaging plane, the formula is:
[0057]
[0058] In the formula, is the tangential distortion coefficient.
[0059] Nonlinear optimization objective function, minimizes the error between the observed value and the projection model, realizes the optimal estimation of the intrinsic matrix, extrinsic matrix and distortion parameters of the industrial camera:
[0060]
[0061] In the formula, is the observed value of the th feature point in the th image; is the projection function considering distortion, which combines the intrinsic matrix, extrinsic matrix and distortion parameters, projects the feature point in the three-dimensional world coordinate system to the pixel coordinate system in the image plane, calculates the theoretical pixel coordinate; is the intrinsic matrix of the industrial camera, contains focal length , principal point coordinate and other parameters, describes the intrinsic properties of the industrial camera projecting three-dimensional space points to the image plane, in the form of ; is the distortion parameter vector, that is, ; is the rotation matrix corresponding to the th image (belongs to the extrinsic matrix), which is a 3×3 orthogonal matrix, describing the rotation attitude of the industrial camera in the world coordinate system; is the translation vector corresponding to the th image (belongs to the extrinsic matrix), which is a 3×1 vector, describing the translation position of the industrial camera in the world coordinate system; is the three-dimensional coordinate of the th feature point in the world coordinate system; is the total number of workpiece surface images; This represents the total number of feature points in each image of the workpiece surface.
[0062] Specifically, the calibration board image can be selected as such as Figure 3 The high-precision checkerboard calibration plate image shown is projected onto the surface of workpiece 4. The side length accuracy of the high-precision checkerboard calibration plate image is ±0.01mm, and the size is 100mm×70mm with 10×7 grids. When projecting the calibration plate image, the calibration plate image is projected onto the end face of workpiece 4 near the tool spindle 2, ensuring that the projection of the calibration plate image is coplanar with the end face of workpiece 4, so that it covers representative positions of the machining area of workpiece 4, which is usually the internal tooth area of each workpiece 4.
[0063] In some embodiments, to ensure that the calibration plate image projection is coplanar with the four end faces of the workpiece, the projection device is configured to adjust the projection position and projection angle. The vision acquisition module extracts the workpiece surface image containing the calibration plate image, identifies the pattern (checkerboard) shape contained in the calibration plate image in the workpiece surface image containing the calibration plate image, and determines that the coplanarity between the calibration plate image projection and the four end faces of the workpiece is low if the pattern contained in the calibration plate image has large distortion, and that the coplanarity between the calibration plate image projection and the four end faces of the workpiece is high if the pattern contained in the calibration plate image has small distortion, and that the calibration plate image projection and the four end faces of the workpiece are coplanar if the pattern contained in the calibration plate image has no distortion.
[0064] Image acquisition stage: The industrial camera acquires images of the workpiece 4 projected with the calibration plate image from different orientations and angles (rotation angle ±30°, translation range ±50mm), acquiring 20 sets of workpiece surface images from different angles. During image acquisition, the distance between the camera and the calibration plate image is controlled within 200mm ±20mm. Simultaneously, by adjusting the light source intensity and angle, uniform illumination of the calibration plate surface image is ensured, avoiding interference factors such as reflections and shadows that could affect image quality.
[0065] The intrinsic and extrinsic parameter matrices of the industrial camera are calculated based on a calibration algorithm. First, the acquired images are preprocessed by grayscale conversion and denoising to reduce the impact of image noise on feature point extraction. Then, a corner detection algorithm is used to extract the interior corners of the checkerboard calibration board image. Based on the coordinates of the extracted interior corners in the image, a system of linear equations is constructed to solve for the initial values of the intrinsic and extrinsic parameter matrices of the industrial camera. Next, the Levenberg-Marquardt algorithm is used to iteratively optimize the intrinsic and extrinsic parameter matrices with the goal of minimizing reprojection error, further improving calibration accuracy.
[0066] After calculating the intrinsic and extrinsic parameter matrices, the machine tool coordinate system, industrial camera coordinate system, and workpiece coordinate system are linked using coordinate transformation formulas. Specifically, the transformation from the workpiece coordinate system to the industrial camera coordinate system is performed first:
[0067] The extrinsic matrix (including the rotation matrix R and the translation vector t) describes the relative pose of the workpiece coordinate system and the industrial camera coordinate system. Based on the extrinsic matrix, any point P3(x3, y3, z3)T in the workpiece coordinate system is converted to a point P2(x2, y2, z2)T in the industrial camera coordinate system, and the conversion formula is:
[0068]
[0069] Then, the conversion from the industrial camera coordinate system to the image pixel coordinate system is performed:
[0070] Based on the intrinsic matrix (including the focal length and the principal point coordinates), a three-dimensional point P2 in the industrial camera coordinate system is projected to a two-dimensional pixel coordinate p(u, v)T in the image plane, and the projection formula is:
[0071]
[0072] Then, the conversion from the industrial camera coordinate system to the machine tool coordinate system is performed:
[0073] First, the rigid conversion relationship between the machine tool coordinate system and the industrial camera coordinate system is established (this relationship is established by the following method: control the machine tool rotary shaft to move to a plurality of known machine tool coordinate positions, and the image projection of the calibration plate follows the movement; simultaneously capture the target coordinates in the image projection of the calibration plate in the industrial camera coordinate system, and fit to obtain the conversion matrix T 12 ), which converts the point P2 in the industrial camera coordinate system to the point P1(x1, y1, z1)T in the machine tool coordinate system, and the conversion formula is:
[0074]
[0075] The relationship between the workpiece coordinate system and the machine tool coordinate system is established:
[0076] Combining the above step conversion relationship, the point P3 in the workpiece coordinate system can be directly converted to the point P1 in the machine tool coordinate system, i.e.:
[0077]
[0078] Thus, the conversion parameters (T 12 ・R and T 12 ・t) of the workpiece coordinate system and the machine tool coordinate system are obtained, realizing the unified relationship of the three coordinate systems, and providing a complete conversion path from the workpiece feature point to the machine tool machining coordinate for subsequent workpiece pose calculation.
[0079] To verify the accuracy of the above coordinate system conversion parameters, the cross-validation method is adopted: select the images that do not participate in the calibration, and use the parameters obtained by the coordinate system conversion parameters to calculate the pose; use the high-precision three-coordinate measuring instrument to obtain the actual coordinates of the workpiece feature points; compare the pose calculation results with the actual measurement values. Ensure that the translation error after coordinate system conversion is controlled within ±0.02mm, and the rotation error is controlled within ±0.05°, which meets the high-precision requirements of the 4 pose error monitoring of the gear machining workpiece.
[0080] III. Image processing and pose calculation module
[0081] For feature point matching, based on the matched feature points, combined with the coordinate system conversion parameters, the pose information of the workpiece coordinate system relative to the industrial camera coordinate system is solved, and the pose information of the workpiece 4 relative to the industrial camera is obtained. Then, according to the coordinate system conversion parameters, the pose information of the workpiece 4 is converted to the machine tool coordinate system, and then the pose information of the workpiece 4 relative to the tool spindle 2 of the machine tool is obtained, which is defined as the actual pose information.
[0082] In this embodiment, when the image processing and pose calculation module performs feature point matching, the ORB algorithm is adopted, and the feature point pairs with high matching degree are selected by calculating the Hamming distance between the feature points.
[0083] Specifically, first, feature point matching and data preprocessing are performed, the ORB algorithm is used to extract and describe the feature points of the workpiece surface image collected by the vision acquisition module, and a 256-bit binary descriptor is generated for each feature point. The similarity between the feature point descriptors is measured by Hamming distance, the feature points of the images under different angles are matched, and the false matching points are removed by using the bidirectional consistency check method to improve the matching accuracy, so as to obtain reliable feature point pairs.
[0084] After completing the feature point matching, 4 groups of feature points that are not coplanar are randomly selected from the matched feature point pairs, and the initial estimated value of the pose of the workpiece coordinate system relative to the industrial camera coordinate system is solved by using the direct linear transformation method according to the camera intrinsic matrix, the distortion parameters and the coordinates of these feature points in the workpiece coordinate system and the industrial camera coordinate system. When the number of iterations reaches 50 times, the iteration is terminated, and the pose information of the workpiece 4 relative to the industrial camera is obtained.
[0085] In this embodiment, the image processing and pose calculation module uses the iterative closest point (ICP) algorithm to refine the pose information of the workpiece coordinate system relative to the industrial camera coordinate system, and the specific steps are as follows:
[0086] The coordinates of the workpiece 4 model point set P and the coordinates of the feature point set Q in the workpiece surface image are taken as inputs. The workpiece 4 model point set P is derived from the workpiece three-dimensional model. Specifically, feature points on the tooth top, tooth root, and end face edge of the workpiece are selected to form the workpiece 4 model point set P.
[0087] The projection point of each point in the point set P under the current pose is calculated, and the nearest point in the point set Q is found to establish a correspondence.
[0088] According to the established correspondence, the least squares method is used to calculate the square sum of the distance between the corresponding point sets P, the minimum rotation matrix, and the translation vector, and the workpiece pose information is updated.
[0089] The above-mentioned correspondence establishment and workpiece pose information updating are repeated until the pose change is less than a set threshold, and the refined pose information of the workpiece 4 relative to the industrial camera is obtained.
[0090] The pose information of the workpiece 4 is converted to the machine tool coordinate system according to the coordinate system conversion parameters, and the pose information of the workpiece 4 relative to the tool spindle 2 of the machine tool is obtained, which is defined as the actual pose information.
[0091] Four, error analysis and feedback module
[0092] The actual pose information of the workpiece 4 relative to the tool spindle 2 is compared with the pre-set ideal pose parameters, and the translation error and rotation error between the actual pose and the ideal pose are calculated to generate quantitative pose error information.
[0093] The error analysis and feedback module is used to predict and compensate the workpiece pose error using a Kalman filter, and the specific method is as follows:
[0094] Combining the motion characteristics of the workpiece in the gear cutting process, the pose error mainly includes translation error and rotation error, and the error changes dynamically over time. The 12-dimensional state vector of the Kalman filter is defined as , k represents the k-th sampling time, the sampling period T matches the frame rate of the industrial camera, for example, if the frame rate of the industrial camera is 60 fps, then . The 12-dimensional state vector is represented as follows:
[0095]
[0096] In the formula, is the X-axis translation error at the k-th time, which represents the deviation of the actual position of the workpiece from the ideal position in the X-axis; is the X-axis translation error change rate at the k-th time, which reflects the dynamic change trend of the translation error; is the translational error of the Y-axis at the kth moment, representing the deviation of the actual position of the workpiece from the ideal position in the Y-axis; is the rate of change of the translational error of the Y-axis at the kth moment, reflecting the dynamic change trend of the translational error; is the translational error of the Z-axis at the kth moment, representing the deviation of the actual position of the workpiece from the ideal position in the Z-axis; is the rate of change of the translational error of the Z-axis at the kth moment, reflecting the dynamic change trend of the translational error; is the rotational error around the X-axis at the kth moment, representing the tilt deviation of the workpiece around the X-axis; is the rate of change of the rotational error around the X-axis, reflecting the dynamic change trend of the rotational error; is the rotational error around the Y-axis at the kth moment, representing the tilt deviation of the workpiece around the Y-axis; is the rate of change of the rotational error around the Y-axis, reflecting the dynamic change trend of the rotational error; is the rotational error around the Y-axis at the kth moment, representing the tilt deviation of the workpiece around the Z-axis; is the rate of change of the rotational error around the Z-axis, reflecting the dynamic change trend of the rotational error.
[0097] Observation vector Output from the error analysis and feedback module (i.e., actual pose error measurement of the workpiece 4 relative to the tool spindle 2). Considering the measurement capability of the industrial camera, the observation vector is defined as a 6-dimensional vector:
[0098]
[0099] wherein, represents the translational error of the X-axis at the kth moment, represents the measurement value of the rotational error around the X-axis; represents the translational error of the Y-axis at the kth moment, represents the measurement value of the rotational error around the X-axis; represents the translational error of the Y-axis at the kth moment, represents the measurement value of the rotational error around the X-axis.
[0100] The core equation of the Kalman filter is constructed:
[0101] Based on the dynamic law of the workpiece pose error and the statistical characteristics of the noise, two key equations are established:
[0102] 1. State transition equation, used to describe the dynamic change of the workpiece pose error:
[0103]
[0104] wherein, is a 12x12 state transition matrix, describing the natural change of workpiece pose error from time k−1 to time k; is a 12x3 control input matrix, describing the effect of machine control commands on error; is a 3-dimensional control input vector (displacement / angle compensation commands of the machine); is a 12-dimensional process noise vector, random disturbances in machining, such as machine vibration, temperature drift.
[0105] 2. Observation equation, used to associate error state with actual measurement:
[0106]
[0107] where, is a 6x12 observation matrix, describing the observable state, only keeping the observation channels of translational and rotational error; is a 6-dimensional observation noise vector, camera measurement error, such as feature point detection error.
[0108] Recursive calculation: prediction and update of Kalman filter:
[0109] Kalman filter outputs the optimal pose error estimate through the iteration of prediction (prior estimate) → update (posterior estimate), each step of recursion corresponds to a sampling period T, the specific steps are as follows:
[0110] Based on the optimal estimate of the last time, predict the error state and the reliability of the error at the current time:
[0111] Prior state estimate, predict the current error state:
[0112] where, is the posterior optimal estimate at time k−1, i.e. the output of the last time, the initial time (k=0) can be set to , assuming initial error-free.
[0113] Prior covariance estimate, predict the reliability of the current error:
[0114] where, is the posterior covariance matrix at time k−1, describing the error distribution of the optimal estimate; the initial time (k=0) is set to a diagonal matrix.
[0115] Calculate the Kalman gain:
[0116] If is small, the prediction is reliable; if is small, it depends less on measurement; if is small, the measurement is reliable; if Large, multi-rely measurement.
[0117] Posterior state estimation:
[0118] where, is the measurement residual, the Kalman gain is achieved by minimizing the residual for optimal fusion.
[0119] Posterior covariance update:
[0120] where I is a 6x6 identity matrix, ensuring is a symmetric positive definite matrix.
[0121] Posterior optimal estimation output by Kalman filter contains the error amount (translation error , , , rotation error , , ) that can be directly used for compensation, which needs to be passed to the motion control module according to the following logic:
[0122] Convert the translation error , , into displacement compensation instructions of the tool spindle 2; convert the rotation error , , into angle compensation instructions of the swing axis 3. Send the compensation instructions to the machine tool numerical control system immediately after each Kalman filter recursion (corresponding to one frame of industrial camera image) is completed, to ensure that the error is corrected without accumulation. Ensure that the machine tool can control the translation error within ±0.01 mm and the rotation error within ±0.02°, quickly and accurately compensate for the workpiece pose error.
[0123] During the adjustment process, the motion control module is also used to monitor the position, speed and acceleration parameters of the tool spindle 2, the rotary shaft 1 and the swing axis 3 in real time, and combine the real-time feedback information of the encoders and grating scales inside the machine tool to form a closed-loop control loop. In this embodiment, the encoder and grating scale are integrated position detection elements inside the machine tool, which belong to the prior art. The principle is that when the rotary shaft 1 or the swing axis 3 rotates, the encoder disc inside the machine tool rotates with it, the light source transmits the grating of the disc to the photosensitive element, generating a periodic pulse signal. The controller inside the machine tool determines the rotation angle of the rotary shaft 1 or the swing axis 3 by counting the number of pulses, and the pulse frequency reflects the rotation speed. This embodiment will not be described in more detail.
[0124] Wherein, the motion control module adopts the combination of feedforward control and feedback control when controlling the actions of the tool spindle 2, the rotary shaft 1 and the swing shaft 3, according to the pre-set motion trajectory of the tool spindle 2, the rotary shaft 1 and the swing shaft 3 and the current pose error information, the motion parameters are pre-adjusted through feedforward control, and the actual motion state of the tool spindle 2, the rotary shaft 1 and the swing shaft 3 is monitored in real time through feedback information in the closed-loop control circuit.
[0125] Specifically, first, the motion control module converts the pose error information into a format that meets the actual control requirements according to the motion characteristics of the machine tool and the mechanical parameters of each shaft.
[0126] In the control instruction generation link, the motion control module combines the pre-set machining process parameters and safety threshold to comprehensively analyze the translational error and rotational error. For the translational error, according to the direction and size of the error, the accurate distance that the tool spindle 2 needs to move is calculated according to the X, Y, Z axis direction of the machine tool coordinate system; for the rotational error, the angle that the swing shaft 3 needs to rotate is determined according to the attitude that the workpiece 4 needs to adjust. These calculation results will be combined into control instructions containing position, speed and acceleration parameters.
[0127] Control the actions of the tool spindle 2, the rotary shaft 1 and the swing shaft 3. For example, the movement distance instruction of the X axis is analyzed into pulse signals or voltage signals that can be executed by the motor drive system, to ensure that the instruction can be accurately conveyed to the driving device of each shaft. When the combination of feedforward control and feedback control is adopted: feedforward control: the motion control module will estimate the parameter adjustment amount of each shaft in the next motion process in advance according to the pre-set motion trajectory of the tool spindle 2, the rotary shaft 1 and the swing shaft 3 and the current pose error information. For example, when the system detects that the workpiece 4 has a certain translational error in the X axis direction and the current motion trajectory is about to enter a complex machining area, the feedforward control will increase the feed speed of the tool spindle 2 in the X axis direction in advance, so that the tool can approach the ideal position faster, reduce error accumulation and improve machining efficiency. Feedback control: the actual motion state of the tool spindle 2, the rotary shaft 1 and the swing shaft 3 is monitored in real time through the feedback information of the encoder and the grating ruler in the closed-loop control circuit. The encoder can accurately measure the rotation angle of the motor, so as to know the actual position of each shaft; the grating ruler can directly measure the displacement of the installation table plane of the workpiece 4 or the tool. The motion control module compares the actual feedback information with the target parameters in the control instruction, and adjusts the control signal immediately to dynamically correct the motion process once the deviation is found. For example, if the actual movement distance of the tool spindle 2 in the Y axis direction deviates from the instruction requirement, the feedback control will timely fine-tune the motor speed to make the tool return to the correct position.
[0128] The Kalman filter is introduced in the error analysis and feedback module, error is predicted and compensated based on the current state and motion law of the workpiece 4, and a motion control strategy combining feedforward control and feedback control is adopted to form a closed loop control circuit. The mechanism can dynamically adjust the actions of the tool spindle 2, the rotary shaft 1 and the swing shaft 3 in real time, and quickly respond to the pose change of the workpiece 4.
[0129] Obviously, the above embodiments are only examples for clearly illustrating the present application, and are not intended to limit the embodiments. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, all the embodiments cannot be exhausted, and the obvious changes or variations derived therefrom are still within the protection scope of the present application.
Claims
1. A workpiece position and orientation error monitoring system for gear cutting, characterized in that, include: The vision acquisition module is used to establish the machine tool coordinate system and the industrial camera coordinate system. It is also used to control the industrial camera to acquire images of the workpiece surface and select feature points from the workpiece surface images to establish the workpiece coordinate system. Establishing a workpiece coordinate system by selecting feature points from a workpiece surface image includes: preprocessing the workpiece surface image acquired by an industrial camera to convert the color image into a grayscale image; identifying sharp corners and edge intersections on the workpiece surface from the preprocessed workpiece surface image; selecting three sharp corners and edge intersections that are not on the same straight line from the identified sharp corners and edge intersections as reference points, using any one of these reference points as the origin of the coordinate system, and determining the X, Y, and Z axes representing the length, width, and height directions based on the relative positional relationship between the three reference points, and establishing a workpiece coordinate system suitable for the workpiece. The coordinate system calibration module is used to project calibration plate images onto the workpiece surface, acquire multiple sets of workpiece surface images from different angles that include calibration plate images, calculate the intrinsic and extrinsic parameter matrices of the industrial camera, establish the association between the workpiece coordinate system and the machine tool coordinate system, and obtain coordinate system transformation parameters. The image processing and pose calculation module is used to match feature points on the workpiece surface image. Based on the matched feature points and coordinate system transformation parameters, it solves the pose information of the workpiece coordinate system relative to the industrial camera coordinate system. Then, it transforms the pose information to the machine tool coordinate system through the coordinate system transformation parameters to obtain the actual pose information of the workpiece relative to the tool spindle. The error analysis and feedback module is used to calculate the translation and rotation errors between the actual pose information and the preset ideal pose information, generate pose error information, predict and compensate for the pose error information, and output compensation commands. The error analysis and feedback module is used to predict and compensate for workpiece pose errors based on a Kalman filter, including: Define a 12-dimensional state vector, which includes the translational error and the rate of change of translational error of the workpiece in the X, Y, and Z axes, as well as the rotational error and the rate of change of rotational error around the X, Y, and Z axes. A state transition equation is constructed based on the dynamic change law of workpiece pose error to predict the natural change of error. A 6-dimensional observation equation is constructed based on the measurement capabilities of an industrial camera. This observation equation only relates to the directly measurable translation and rotation errors, ignoring the error change rate that cannot be directly measured. The prior estimate for the current time is obtained through the prediction step, and then the Kalman gain is calculated by combining the observation vector. Based on the Kalman gain and the measurement residual, the prior state estimate is corrected to obtain the posterior state estimate. The prediction and correction steps are executed iteratively to output the optimal pose error estimate. The translation error and rotation error in the optimal pose error estimate are integrated into pose error information. The motion control module is used to control the movement of the tool spindle, rotary axis and swivel axis based on compensation commands, to compensate for translational and rotational errors of the workpiece, and to adjust the workpiece posture.
2. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The machine tool coordinate system is defined based on the machine tool's own CNC system; the industrial camera coordinate system is temporarily defined based on the optical center of the industrial camera.
3. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The vision acquisition module is used to control multiple industrial cameras to acquire workpiece surface images from different angles, obtain multiple sets of workpiece surface images, and process the workpiece surface images through a multi-view fusion algorithm.
4. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The vision acquisition module is used to extract the workpiece surface image containing the calibration plate image, identify the pattern state contained in the calibration plate image, and the coplanarity between the calibration plate image projection and the workpiece end face is proportional to the distortion of the pattern contained in the calibration plate image. If there is no distortion in the pattern contained in the calibration plate image, it is determined that the calibration plate image projection and the workpiece end face are coplanar, thus completing the projection of the calibration plate image onto the workpiece surface.
5. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The coordinate system calibration module is used to calibrate and compensate for the radial and tangential distortion parameters of the industrial camera by projecting calibration plate images of different shapes and sizes onto the workpiece surface during the calculation of the intrinsic and extrinsic parameter matrices of the industrial camera.
6. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The coordinate system calibration module is used to transform any point in the workpiece coordinate system to a point in the industrial camera coordinate system based on the extrinsic parameter matrix; to project three-dimensional points in the industrial camera coordinate system to two-dimensional pixel coordinates on the image plane based on the intrinsic parameter matrix; and to transform points in the industrial camera coordinate system to points in the machine tool coordinate system through the established rigid transformation relationship between the machine tool coordinate system and the industrial camera coordinate system, establish the association between the workpiece coordinate system and the machine tool coordinate system, and obtain the transformation parameters between the workpiece coordinate system and the machine tool coordinate system, which are defined as coordinate system transformation parameters.
7. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The image processing and pose calculation module is used to extract and describe feature points from workpiece surface images using the ORB algorithm, generating a 256-bit binary descriptor for each feature point; the similarity between feature point descriptors is measured by Hamming distance, feature point matching is performed on images from different viewpoints, and a bidirectional consistency check method is used to remove mismatched points to obtain feature point pairs.
8. The workpiece position error monitoring system for gear cutting according to claim 1, characterized in that, The motion control module is used to adjust the motion parameters in advance through feedforward control based on the preset motion trajectories of the tool spindle, rotary axis and swivel axis and the current pose error information. At the same time, it uses the closed-loop control loop to provide real-time feedback information and dynamically correct the motion process of the tool spindle, rotary axis and swivel axis.
Citation Information
Patent Citations
Panoramic image-based camera pose estimation method and system
CN114549634A
Robot system and control method of robot system
JP2014104530A