A cutting fluid nozzle adaptive control method and device for a CNC machining center

By designing the adaptive control device for cutting fluid nozzles in CNC machining centers, using the camera to collect tool images in real time and control the nozzle rotation, the problem of cutting fluid nozzle angle adjustment in the prior art cannot be manually controlled and has poor compatibility, and flexible cutting fluid injection control and the effect of widely adapting to various CNC machining centers is achieved.

CN119098821BActive Publication Date: 2025-05-09CHENGDU AERONAUTIC POLYTECHNIC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411557181.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-05-09
Estimated Expiration
2044-11-04

AI Technical Summary

Technical Problem

The cutting fluid nozzle angle adjustment device of the existing CNC machining center cannot be manually operated and cannot be compatible with the data communication protocols of various CNC machining centers, resulting in indiscriminate installation and use in different CNC machining centers.

Method used

An adaptive control device for cutting fluid nozzles in CNC machining center is designed, including an execution module, a human-computer interface module and a main control module. The execution module collects tool images in real time through the camera and controls the nozzle rotation. The human-machine interface module is used to switch modes manually or automatically. The main control module controls the rotation angle and motion mode of the nozzle according to real-time image data or instructions of the human-machine interface module.

Benefits of technology

It realizes adaptive adjustment of the cutting fluid injection position without interrupting the metal processing process, provides a more flexible and convenient cutting fluid injection control mode, adapts to various CNC machining centers, and improves the accuracy of cutting fluid injection recognition of the nozzle to the tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119098821B_ABST
    Figure CN119098821B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of cooling devices for numerical control machining, and in particular to a method and device for adaptively controlling a cutting fluid nozzle in a numerical control machining center. The device comprises an execution module, a human-machine interface module, and a main control module. The execution module collects tool images in real time through an externally arranged camera assembly, and drives the nozzle near the end to rotate through an internally arranged motor. The human-machine interface module is used to realize the switching between automatic and manual control modes. The main control module sets the state according to the control mode received from the human-machine interface module or analyzes the tool tip position according to the tool image collected by the camera assembly to control the nozzle rotation angle. The cutting fluid is sprayed through the nozzle along the axial working range of the tool. The present invention can solve the technical problems that the cutting fluid angle adjustment device of the numerical control machining center cannot be manually controlled and cannot be compatible with various types of data machining center equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of numerical control machining cooling devices, in particular to a cutting fluid nozzle adaptive control method and device for a numerical control machining center. Background Art

[0002] Cutting fluid is usually used in the process of metal cutting. Cutting fluid plays the role of cooling, lubrication, chip removal and rust prevention in the cutting process, which helps to improve the durability of the tool, reduce the thermal deformation of the workpiece being cut, and ensure the quality of the processed surface. At present, most CNC machining centers use external cooling mode. The spindle is connected to a nozzle with a fixed angle to spray cutting fluid on the tool during workpiece processing. During the metal cutting process, the tool may be replaced automatically. If a fixed-angle nozzle is used, the cutting fluid spray angle cannot be adaptively adjusted during the processing after the tool is replaced.

[0003] Faced with this situation, the existing technology usually needs to interrupt the metal cutting process and make adjustments manually. In order to ensure the precise injection of cutting fluid and avoid interrupting the metal cutting process, the commonly used methods are: one is to install multiple nozzles to spray cutting fluid at all possible positions, but this method will cause a large amount of cutting fluid to be used, which will not only increase production costs, but also bring huge potential harm to the environment; the other is to use an angle-adjustable nozzle to dynamically adjust the injection angle of the cutting fluid, but in the current invention, the nozzle angle adjustment device of the cutting fluid is fixedly connected to the spindle of the CNC machining center and cannot be flexibly used and adjusted. In addition, the nozzle angle adjustment is mainly controlled by the data of the CNC machining center and cannot be manually intervened. Moreover, due to the incompatibility between different communication protocols of various CNC machining centers, the current cutting fluid angle adjustment device has not yet been able to achieve indiscriminate installation and use in various CNC machining centers. Summary of the invention

[0004] In order to solve the technical problems that the cutting fluid angle adjustment device of the CNC machining center in the prior art cannot be manually controlled and cannot be compatible with various types of data machining center equipment, the purpose of the present invention is to provide a cutting fluid nozzle adaptive control method and device for a CNC machining center. The technical solution adopted is as follows:

[0005] In a first aspect, a cutting fluid nozzle adaptive control device for a CNC machining center is provided, comprising an execution module, a human-machine interface module, and a main control module, characterized in that:

[0006] The execution module collects the tool image in real time through an externally arranged camera assembly, and drives the nozzle near the end to rotate through an internally arranged motor;

[0007] The human-machine interface module is used to realize the switching between automatic and manual control modes, and in the manual control mode, sends a nozzle rotation angle instruction to the main control module;

[0008] The main control module controls the nozzle rotation angle according to the control mode setting state received from the human-machine interface module. In the automatic control mode, the main control module receives and processes the tool image collected in real time by the execution module and generates instructions to drive the motor set inside the execution module to rotate;

[0009] The nozzle has two motion modes, fixed and sweeping. In the fixed motion mode, the main control module controls the nozzle of the execution module to rotate to a specified angle by receiving angle data from the human-machine interface module or by receiving and processing tool images collected in real time by the execution module and generating angle data; in the sweeping motion mode, the main control module controls the nozzle of the execution module to reciprocate within a set angle range by receiving center angle and sweeping angle data from the human-machine interface module or by receiving and processing tool images collected in real time by the execution module and generating angle data, and the cutting fluid is swept and sprayed through the nozzle along the axial working range of the tool.

[0010] Furthermore, the execution module also includes a fixture, and the execution module is installed at the edge of the spindle of the machining center through the top surface of the fixture. The camera assembly is installed on the side of the fixture close to the spindle direction of the machining center. The cutting fluid is connected to the cutting fluid inlet of the execution module through a hose and sprayed out from the nozzle.

[0011] Furthermore, the camera assembly includes two cameras, and the two cameras are horizontally installed on the side of the tooling fixture at a preset distance.

[0012] Furthermore, the human-machine interface module is independently installed beside the operation panel of the CNC machining center, and the main control module is independently installed in the control cabinet of the CNC machining center only as a control unit of the cutting fluid nozzle.

[0013] Furthermore, the human-machine interface module includes a center angle adjustment knob, a sweep range adjustment knob, a control mode switching button, and an LCD display; the center angle adjustment knob is used to adjust the nozzle rotation angle in manual mode; the sweep range adjustment knob is used to set the nozzle sweep angle range in manual mode; the control mode switching button is used to switch between automatic and manual control modes; the LCD display is used to display nozzle adjustment information and actual angle status information.

[0014] Furthermore, the main control module includes an execution module communication interface, a machining center data communication interface, and a human-machine interface module communication interface, which respectively realize communication connections with the execution module's motor, the machining center database, and the human-machine interface module, wherein the communication connection with the execution module and the machining center data communication interface is a wired or wireless connection, and the communication connection with the human-machine interface module adopts a wireless connection.

[0015] Furthermore, the number of the execution modules is greater than or equal to 1. When the number of the execution modules is greater than 1, the execution modules are evenly arranged at equal angles along the main axis of the machining center.

[0016] In a second aspect, a control method corresponding to any one of the cutting fluid nozzle adaptive control devices for a CNC machining center is provided, comprising the following steps:

[0017] Step S1: calibrating the camera assembly parameters through a chessboard image, wherein the parameter calibration includes intrinsic parameter estimation, distortion correction and extrinsic parameter calculation;

[0018] Step S2: the main control module obtains the tool image captured by the camera assembly, and uses the parameter calibration result to correct the tool image so that the imaging planes of the left and right cameras of the camera assembly are coplanar and parallel;

[0019] Step S3: define the midpoint of the left and right cameras as the coordinate origin, and obtain the spatial coordinates of the tool tip point according to the distance between the left and right cameras, the center coordinates of the tool image collected by the camera assembly and the position of the tool tip point in the tool image, and the focal lengths of the left and right cameras;

[0020] Step S4: Obtain the nozzle rotation angle according to the distance between the left and right camera connection lines and the nozzle rotation axis and the spatial coordinates of the tool tip point;

[0021] Step S5: the motor of the execution module controls the rotation of the nozzle according to the rotation angle of the nozzle;

[0022] Step S6: Repeat the above steps 2 to 5 according to the preset first threshold frequency, dynamically adjust the rotation of the nozzle, and perform sweeping spraying through the nozzle into the axial working range of the tool.

[0023] Furthermore, the intrinsic parameter estimation, distortion correction and extrinsic parameter calculation in step S1 are specifically as follows:

[0024] The intrinsic parameter estimation includes the focal lengths of the left and right cameras along the x-axis and the y-axis, and the center coordinates of the images captured by the left and right cameras;

[0025] The distortion correction includes radial distortion coefficient and tangential distortion coefficient;

[0026] The external parameter calculation includes the rotation matrix calculation and the translation vector calculation between the left and right cameras.

[0027] Furthermore, the spatial coordinates of the tool tip point of the tool are obtained in step S3 as follows:

[0028] According to the distance between the left and right cameras, the x-coordinate parallax of the tool tip in the images obtained by the left and right cameras, and the focal lengths of the left and right cameras, the z-axis coordinate of the tool tip is obtained;

[0029] The x-axis coordinate of the tool tip point is obtained according to the difference between the x-coordinate of the tool tip point in the image obtained by the left camera and the x-coordinate of the center of the image obtained by the left camera, the z-axis coordinate of the tool tip point, the focal lengths of the left and right cameras, and the distance between the left and right cameras;

[0030] The z-axis coordinate of the tool tip point is obtained based on the difference between the y-coordinate of the tool tip point in the image obtained by the left camera and the y-coordinate of the image center obtained by the left camera, the z-axis coordinate of the tool tip point, and the focal lengths of the left and right cameras.

[0031] The present invention has the following beneficial effects:

[0032] 1. It can provide users with more flexible and convenient cutting fluid injection control mode selection. In the manual control mode, the user adjusts the nozzle rotation angle and sets the nozzle sweep angle range through the center angle adjustment knob and sweep range adjustment knob on the human-machine interface module, respectively, to achieve flexible adjustment under manual participation. In the automatic control mode, the main control module receives and processes the tool image collected in real time by the execution module and automatically generates instructions, drives the motor set inside the execution module to rotate and send the nozzle rotation angle instruction to the execution module, and the cutting fluid is swept and sprayed through the nozzle along the axial working range of the tool; in addition, the nozzle has two motion modes, fixed and sweeping. In the fixed motion mode, the main control module controls the nozzle of the execution module to rotate to the specified angle by receiving the angle data sent by the human-machine interface module or by receiving and processing the tool image collected in real time by the execution module and generating angle data; in the sweep motion mode, the main control module controls the nozzle of the execution module to reciprocate within the set angle range by receiving the center angle and sweep angle data sent by the human-machine interface module or by receiving and processing the tool image collected in real time by the execution module and generating angle data.

[0033] 2. The cutting fluid nozzle adaptive control device provided by the present invention is easy to install and widely adaptable to various types of CNC machining centers. By setting three independent and different modules for the cutting fluid nozzle adaptive control device: execution module, human-machine interface module, and main control module, in terms of installation method, the execution module can be independently and conveniently installed at the edge of the spindle of the machining center, the human-machine interface module is independently installed next to the operation panel of the CNC machining center, and the main control module is only independently installed in the control cabinet of the CNC machining center as a control unit of the cutting fluid nozzle. This setting method does not change the layout and internal structure of the original CNC machining center, and is easy to install; in addition, the communication connection between the main control module and the execution module and the data communication interface of the machining center is a wired or wireless connection, and the communication connection between the execution module and the human-machine interface module adopts a wireless connection. In this way, the problem of incompatibility between the cutting fluid nozzle adaptive control device provided by the present invention and the different communication protocols of various CNC machining centers is avoided; in summary, the cutting fluid angle adjustment device provided by the present invention can be installed and used in various CNC machining centers without distinction.

[0034] 3. The cutting fluid nozzle adaptive control method provided by the present invention has a higher accuracy in identifying the cutting fluid spray of the tool by the nozzle. First, the parameters of the binocular camera are calibrated through the chessboard image, and the main control module obtains the tool image collected by the camera component, and the parameter calibration result is used to correct the tool image so that the imaging planes of the left and right cameras of the camera component are coplanar and parallel; then the midpoint of the left and right cameras is defined as the coordinate origin, and the spatial coordinates of the tool tip point are obtained according to the distance between the left and right cameras, the center coordinates of the tool image collected by the camera component and the position of the tool tip point in the tool image, and the focal length of the left and right cameras. The nozzle rotation angle is obtained according to the distance between the left and right cameras and the nozzle rotation axis, and the spatial coordinates of the tool tip point; finally, the motor of the execution module controls the rotation of the nozzle according to the nozzle rotation angle; step S6: repeat the above steps 2 to 5 according to the preset first threshold frequency, dynamically adjust the rotation of the nozzle, and perform sweeping spraying through the nozzle to the axial working range of the tool. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 A schematic diagram of the installation position of a cutting fluid nozzle adaptive control device for a CNC machining center provided by one embodiment of the present invention;

[0037] Figure 2 A schematic diagram of an execution module of a cutting fluid nozzle adaptive control device for a CNC machining center provided by an embodiment of the present invention;

[0038] Figure 3 A schematic diagram of a control module of a cutting fluid nozzle adaptive control device for a CNC machining center provided by one embodiment of the present invention;

[0039] Figure 4 A schematic diagram of a human-machine interface module of a cutting fluid nozzle adaptive control device for a CNC machining center provided by one embodiment of the present invention;

[0040] Figure 5 A schematic diagram of a multi-point injection of a cutting fluid nozzle adaptive control device for a CNC machining center provided by an embodiment of the present invention;

[0041] Figure 6 A schematic diagram of a nozzle rotation spray angle of a cutting fluid nozzle adaptive control device for a CNC machining center provided by an embodiment of the present invention;

[0042] Figure 7 A schematic diagram of a camera calibration device provided by an embodiment of the present invention;

[0043] Figure 8 A flow chart of a cutting fluid nozzle adaptive control method for a CNC machining center provided by one embodiment of the present invention.

[0044] In the figure: 1. Execution module; 2. Human-machine interface module; 3. Main control module; 4. Motor; 5. Nozzle; 6. Fixture; 7. Camera assembly; 8. Center angle adjustment knob; 9. Sweep range adjustment knob; 10. Control mode switching button; 11. LCD display; 12. Calibration device. DETAILED DESCRIPTION

[0045] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, characteristics and effects of a cutting fluid nozzle adaptive control method and device for a CNC machining center proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. Unless otherwise defined, all technical and scientific terms used in this article have the same meaning as those generally understood by technicians in the technical field of the present invention.

[0046] The specific scheme of the cutting fluid nozzle adaptive control method and device for a CNC machining center provided by the present invention is described in detail below in conjunction with the accompanying drawings.

[0047] First, see Figure 1-Figure 7 , which shows a schematic diagram related to a cutting fluid nozzle adaptive control device for a CNC machining center provided by an embodiment of the present invention.

[0048] like Figure 1 The schematic diagram of the installation position of a cutting fluid nozzle adaptive control device for a CNC machining center is shown, and the cutting fluid nozzle adaptive control device for a CNC machining center includes an execution module 1, a human-machine interface module 2, and a main control module 3. The execution module 1 collects tool images in real time through an externally arranged camera component 7, and drives the nozzle 5 near the end to rotate through an internally arranged motor 4.

[0049] Among them, the human-machine interface module 2 is used to realize the switching between automatic and manual control modes, and in the manual control mode, sends the nozzle rotation angle instruction to the main control module 3; the main control module 3 controls the rotation angle of the nozzle 5 according to the control mode setting state received from the human-machine interface module 2. In the automatic control mode, the main control module 3 receives and processes the tool image collected in real time by the execution module 1 and generates instructions to drive the motor 4 set inside the execution module 1 to rotate; the nozzle 5 has two motion modes: fixed and sweeping. In the fixed motion mode, the main control module 3 controls the nozzle of the execution module 1 to rotate to the specified angle by receiving the angle data sent by the human-machine interface module 2 or by receiving and processing the tool image collected in real time by the execution module 1 and generating angle data; in the sweeping motion mode, the main control module 3 controls the nozzle 5 of the execution module 1 to reciprocate within the set angle range by receiving the center angle and sweeping angle data sent by the human-machine interface module 2 or by receiving and processing the tool image collected in real time by the execution module 1 and generating angle data, and the cutting fluid is swept and sprayed through the nozzle 5 along the axial working range of the tool. For example, the main control module 3 receives the central angle of 45° and the sweep angle of 15° from the human-machine interface module 2, so that the nozzle reciprocates within the set angle range of 45°±15° (30°~60°).

[0050] The control mode in manual control mode and automatic control mode can provide users with more flexible and convenient cutting fluid injection control mode selection. In addition, the nozzle 5 has two motion modes, fixed and sweeping, to spray the tool to achieve tool cooling. This solution can accurately adjust the cutting fluid injection position according to the processing conditions without interrupting the metal processing process, and is particularly suitable for minimal lubrication processing technology.

[0051] More specifically, the execution module 1 also includes a fixture 6, and the execution module 1 is installed on the edge of the main shaft of the machining center through the top surface of the fixture 6. Among them, the fixture 6 mainly includes a shell and an upper mounting surface. The shell material of the fixture 6 can be aluminum alloy or injection molded parts, and the upper mounting surface can be installed on the edge of the main shaft of the machining center by fixing bolts or magnetic attraction. In this way, the execution module 1 can be flexibly installed in various types of CNC machining centers. In addition, the camera assembly 7 is installed on the side of the fixture 6 close to the main shaft direction of the machining center; the cutting fluid is connected to the cutting fluid inlet of the execution module 1 by a hose and sprayed out from the nozzle 5. In addition, the motor 4 can select a stepper motor.

[0052] Furthermore, the camera assembly 7 includes two cameras, forming a binocular vision assembly, so that the tool position can be more accurately positioned by the camera. In addition, the two cameras are horizontally installed on the side of the tooling fixture 6 at a preset distance.

[0053] Furthermore, the human-machine interface module 2 is independently installed next to the operation panel of the CNC machining center, and can be installed by fixing bolts, snapping or magnetic attraction. The main control module 3 is only independently installed in the control cabinet of the CNC machining center as a control unit of the cutting fluid nozzle.

[0054] Furthermore, the human-machine interface module 2 includes a center angle adjustment knob 8, a sweep range adjustment knob 9, a control mode switching button 10, and an LCD display screen 11; the center angle adjustment knob 8 is used to adjust the rotation angle of the nozzle 5 in manual mode; the sweep range adjustment knob 9 is used to set the sweep angle range of the nozzle 5 in manual mode; the control mode switching button 10 is used to switch between automatic and manual control modes; the LCD display screen 11 is used to display the nozzle 5 adjustment information and actual angle status information.

[0055] Furthermore, the main control module 3 includes an execution module communication interface 301, a machining center data communication interface 302, and a human-machine interface module communication interface 303, which respectively realize communication connection with the motor of the execution module 1, the machining center database, and the human-machine interface module 2, wherein the communication connection with the execution module 1 and the machining center data communication interface is a wired or wireless connection, and the communication connection with the human-machine interface module 2 is a wireless connection. Considering that the execution module 1 and the human-machine interface module 2 are both independently installed on the external surface of the CNC machining center and the distance between the two is relatively close, the electromagnetic compatibility between the two is less affected, so the execution module 1 and the human-machine interface module 2 can be connected wirelessly, ensuring that the communication between the two is reliable, and flexibly installed in various existing CNC machining centers, avoiding the problem of incompatibility between different communication protocols of various CNC machining centers.

[0056] Furthermore, the number of execution modules 1 is greater than or equal to 1. When the number of execution modules 1 is greater than 1, the execution modules 1 are evenly arranged at equal angles along the main axis of the machining center. Specifically, Figure 5 The diagram shown is a multi-point spraying schematic diagram of a cutting fluid nozzle adaptive control device for a CNC machining center, which realizes multi-point spraying of the tool and has a better cooling effect.

[0057] Since the camera of the camera assembly 7 is relatively close to the tool, after the nozzle 5 sprays the cutting fluid, the cutting fluid will splash on the tool to produce fine water mist. The water mist adheres to the camera and makes it impossible to locate the tool position. Therefore, this embodiment makes the following improvements to the above-mentioned cutting fluid nozzle adaptive control device for the CNC machining center.

[0058] A clamp is provided at one end of the nozzle 5 away from the nozzle outlet and connected to a scraper (not shown in the attached figure). The scraper is used to clean the outer surface of the camera assembly 7 after the nozzle 5 rotates a certain angle to ensure the cleanliness of the outer surface of the camera. Since the action performed by the nozzle 5 of the execution module 1 is an axial rotation around the motor shaft, the matching fixture 6 is set to an arc shape except for the installation surface which is a plane, so that the scraper can rotate or reciprocate with the nozzle 5 of the execution module 1, and when it rotates a certain angle, the scraper of the nozzle 5 can clean the outer surface of the camera assembly 7 to ensure the cleanliness of the outer surface of the camera, and further ensure that the camera can clearly detect the tool position when performing tool position detection.

[0059] When in use, in order to realize the adaptive control of the cutting fluid nozzle of the CNC machining center, when the camera assembly 7 is needed to detect the tool position, if the image detected by the left and right cameras of the camera assembly 7 is in a blurred state, it is determined that it is blocked by foreign objects such as water stains. At this time, the main control module 3 controls the nozzle 5 of the execution module 1 to rotate upward to exceed the position of the camera assembly 7, and the nozzle 5 drives the scraper to rotate. When the scraper moves to the camera assembly 7 area, it can clean the left and right camera lenses to achieve the cleaning of the left and right camera lenses. It should be noted here that the outer surface diameter of the lens of the camera assembly 7 is larger than the diameter of the arc-shaped outer surface of the fixture 6, and the scraper of the scraper close to one end of the execution module 1 is between the outer surface of the lens of the camera assembly 7 and the arc-shaped outer surface of the fixture 6. In this way, it can be ensured that when the nozzle 5 moves to drive the scraper of the scraper to move, only the outer surface of the lens of the camera assembly 7 is cleaned, and the arc-shaped outer surface of the fixture 6 is not cleaned. While ensuring the purpose of cleaning the outer surface of the lens of the camera assembly 7, unnecessary wear of the scraper of the scraper is avoided.

[0060] Second, see Figure 8, which shows a flow chart of a cutting fluid nozzle adaptive control method for a CNC machining center provided by an embodiment of the present invention. The method is implemented by the above-mentioned cutting fluid nozzle adaptive control device for a CNC machining center. The method comprises the following steps:

[0061] Step S1: calibrating the camera assembly 7 using a chessboard image, wherein the calibration includes internal parameter estimation, distortion correction and external parameter calculation.

[0062] Among them, parameter estimation, distortion correction and external parameter calculation are specifically as follows: internal parameter estimation includes the focal length of the left and right cameras along the x-axis and y-axis, and the center coordinates of the left and right cameras to collect images; distortion correction includes radial distortion coefficients and tangential distortion coefficients; external parameter calculation includes rotation matrix calculation and translation vector calculation between the left and right cameras. In addition, the checkerboard image is a black and white checkerboard.

[0063] More specifically, firstly, the left and right cameras of the camera assembly 7 collect multiple images such as Figure 7 The checkerboard image of the calibration device shown in the figure detects the checkerboard corner points in each collected image, and for each image, saves the detected two-dimensional corner point image coordinates Then, create a set of three-dimensional points in the world coordinate system that includes the corner points of the chessboard. The origin of the world coordinate system (0,0,0) is set at the lower left corner of the chessboard. The coordinates of the corner points on the chessboard image in the world coordinate system have a z coordinate of 0. The side length of each small grid in the chessboard is set to ,by Figure 7 Taking the P11 corner point as an example, its three-dimensional coordinates in the world coordinate system are . The detected two-dimensional corner image coordinates With its 3D world coordinates Make one-to-one correspondence.

[0064] The intrinsic parameter estimation is mainly the intrinsic parameter matrix of the left and right cameras Calculate and construct the intrinsic parameter matrix of the left and right cameras The calculation formula is as follows:

[0065]

[0066] In the formula, express The focal length of the axis; express The focal length of the axis; Indicates the coordinate position of the principal point of a two-dimensional image; Represents the intrinsic parameter matrix corresponding to the camera.

[0067] The formula for constructing the distortion coefficients of the left and right cameras is as follows:

[0068]

[0069] In the formula, , , Represents the radial distortion coefficient of the camera; , Represents the tangential distortion coefficient of the camera; Represents the distortion coefficient of the camera.

[0070] The intrinsic parameter calibration process also requires the construction of the transformation relationship from three-dimensional points in space to two-dimensional points in the image, including the rotation matrix and translation vectors ; Calculate the predicted image coordinates, estimate the initial intrinsic parameters according to the DLT (Direct Linear Transform) algorithm, and then use the Levenberg-Marquardt nonlinear optimization method to optimize the initial intrinsic parameters to obtain more accurate intrinsic parameters. Then, use the estimated intrinsic parameters and the three-dimensional spatial coordinates of the corner points to calculate the predicted image coordinates .

[0071] In this embodiment, the formula for projecting the three-dimensional space coordinates of the corner points to the two-dimensional coordinates is as follows:

[0072]

[0073] In the formula, The rotation matrix representing the corner point; Represents the translation vector of the corner point; Represents the three-dimensional coordinates of the corner point in the world coordinate system, Represents the three-dimensional coordinates of the corner point in the world coordinate system The two-dimensional coordinates obtained by projection.

[0074] Furthermore, the image coordinate formula for constructing the corner points is as follows:

[0075]

[0076] In the formula, Represents the three-dimensional coordinates of the corner point in the world coordinate system The two-dimensional coordinates obtained by projection; Represents the intrinsic parameter matrix corresponding to the camera; Represents the image coordinates of the corner point obtained by mapping the two-dimensional coordinates to the image coordinate system.

[0077] In this embodiment, the formula for constructing the image coordinates of the corner points for distortion correction is as follows:

[0078]

[0079] In the formula, Represents the predicted image coordinates after distortion correction; The predicted image coordinates after preliminary distortion correction; k1, k2, k3 represent the radial distortion coefficients of the camera; p1, p2 represent the tangential distortion coefficients of the camera; Indicates mapping the two-dimensional coordinates to the image coordinate system to obtain the image coordinates of the corner points; express Distance from the origin.

[0080] Furthermore, the reprojection error formula for constructing the corner points is as follows:

[0081]

[0082] In the formula, Minimize all corner points Reprojection error, i.e. minimizing the difference between the actual corner position and the predicted corner position; Represents the predicted image coordinates after distortion correction; Represents the two-dimensional corner image coordinates detected by the camera; Represents the intrinsic parameter matrix corresponding to the camera; Represents the distortion coefficient of the camera; express Rotation matrix; Represents the translation vector of the corner point; represents the i-th corner point; arg represents the average value of the data; min represents the minimum value.

[0083] By minimizing all corner points Reprojection Error , that is, the difference between the actual corner point position and the predicted corner point position realizes the above internal parameters , , , At this point, the internal parameter estimation and distortion correction in parameter calibration are completed.

[0084] Furthermore, the extrinsic parameters include the rotation matrix between the two cameras and translation vectors .

[0085] 3D world coordinates The pixel coordinates in the left and right camera images are and , the relationship formula is as follows:

[0086]

[0087] In the formula, , Respectively represent the calibrated left camera and right camera rotation matrices; , They are the calibrated translation vectors of the left camera and the right camera respectively; and Represent the intrinsic parameter matrices of the left and right cameras respectively.

[0088] Taking the left camera as an example, the extrinsic parameters of the left camera are usually set to the unit matrix and the zero vector, as shown in the following formula:

[0089]

[0090] Taking the right camera as an example, the external parameters for constructing the right camera are usually set as the rotation matrix and translation vector from the left camera to the right camera, as shown in the following formula:

[0091]

[0092] In the formula, represents the rotation matrix of the right camera, represents the translation vector of the right camera, and Represents the rotation matrix and translation vector from the left camera to the right camera.

[0093] Construct the following formula to minimize all corner points The reprojection error is used to solve the extrinsic parameters.

[0094]

[0095] In the formula, Represents the minimized corner points of the left and right cameras Reprojection error, i.e. minimizing the difference between the actual corner position and the predicted corner position; and Represents the rotation matrix and translation vector from the left camera to the right camera; arg represents the average value of the data; min represents the minimum value; represents the i-th corner point; Indicates the three-dimensional world coordinates of any point actually measured; Indicate point The corresponding three-dimensional world coordinates after reprojection; dis represents , The distance between two points; Pixel coordinates in the right camera image; Represents the three-dimensional world coordinates corresponding to pixel point i; Represents the intrinsic parameter matrix of the right camera.

[0096] Step S2: the main control module 3 obtains the tool image captured by the camera assembly 7, and uses the parameter calibration result to correct the tool image so that the imaging planes of the left and right cameras of the camera assembly 7 are coplanar and parallel;

[0097] Specifically, image correction aligns the images of the left and right cameras to a unified plane. In order to transform the left and right images to an aligned state, the homography matrix of the left image is constructed. , the homography matrix of the right image The formula is as follows:

[0098]

[0099] In the formula, represents the homography matrix of the left image; represents the homography matrix of the right image; and Represent the intrinsic parameter matrices of the left and right cameras respectively; and Represents the rotation matrix and translation vector from the left camera to the right camera; For the matrix The inverse matrix of Representation Matrix The inverse matrix of is the projection of the optical center of the right camera on the image plane of the left camera; Representation vector The transpose of .

[0100] Finally, the image is transformed using the homography matrix to transform the original image into the aligned and corrected image, as shown in the following formula:

[0101]

[0102]

[0103] In the formula, represents the homography matrix of the left image; represents the homography matrix of the right image; Represents the pixel coordinates in the left camera image; Pixel coordinates in the right camera image; Represents the pixel coordinates in the left camera image after alignment correction; Represents the pixel coordinates in the right camera image after alignment correction.

[0104] Step S3: Define the midpoint of the left and right cameras as the coordinate origin, and obtain the spatial coordinates of the tool tip point according to the distance between the left and right cameras, the center coordinates of the tool image captured by the camera assembly 7 and the position of the tool tip point in the tool image, and the focal length of the left and right cameras.

[0105] Among them, the spatial coordinates of the tool tip point in the step S3 are obtained specifically as follows: according to the distance between the left and right cameras, the x-coordinate parallax of the tool tip point in the images obtained by the left and right cameras, and the focal lengths of the left and right cameras, the z-axis coordinate of the tool tip point is obtained; according to the difference between the x-coordinate of the tool tip point in the image obtained by the left camera and the x-coordinate of the center of the image obtained by the left camera, the z-axis coordinate of the tool tip point, the focal lengths of the left and right cameras, and the distance between the left and right cameras, the x-axis coordinate of the tool tip point is obtained; according to the difference between the y-coordinate of the tool tip point in the image obtained by the left camera and the y-coordinate of the center of the image obtained by the left camera, the z-axis coordinate of the tool tip point, and the focal lengths of the left and right cameras, the z-axis coordinate of the tool tip point is obtained.

[0106] In this embodiment, the neural network model is used to locate the position of the tool tip in the image. The coordinates of the tool tip in the left and right images are respectively and , parallax ; Define the midpoint of the binocular camera system as the coordinate origin 0, the X-axis is along the direction of the left and right camera connection, the Y-axis is upward along the fixture of the execution module, and the Z-axis is along the camera optical axis pointing to the tool direction. The optical center coordinates of the left camera are , the optical center coordinates of the right camera are ; Construct the spatial coordinates of the tool tip in the defined coordinate system The calculation formula is as follows:

[0107]

[0108] In the formula, and Indicates the tool tip coordinates in the left and right images; represents the x-coordinate parallax of the tool tip in the images captured by the left and right cameras; Indicates left,camera distance; Indicates the spatial z coordinate value of the tool tip in the defined coordinate system; Indicates the spatial y coordinate value of the tool tip in the defined coordinate system; Indicates the spatial x coordinate value of the tool tip in the defined coordinate system; is the image center coordinate; f is the focal length of the left and right cameras.

[0109] In the above-mentioned tool tip spatial coordinate calculation formula, the ratio of the tool tip z coordinate to the camera focal length is equal to the ratio of the distance between the left and right cameras to the x coordinate parallax of the tool tip in the image acquired by the left and right cameras; for the tool tip y coordinate, consider the proportional relationship ,so ; For the x-coordinate of the tool tip, consider the proportional relationship , combined with the x coordinate of the left camera get.

[0110] Step S4: Obtain the nozzle rotation angle according to the distance between the left and right camera connection lines and the nozzle rotation axis and the spatial coordinates of the tool tip point;

[0111] The calculation formula for the nozzle rotation angle constructed in this embodiment is as follows: In the formula, Indicates the nozzle rotation angle; Indicates the spatial z coordinate value of the tool tip in the defined coordinate system; Indicates the spatial y coordinate value of the tool tip in the defined coordinate system; Indicates the distance between the left and right camera connection lines and the nozzle rotation axis.

[0112] In the above nozzle rotation angle calculation formula, the initial position of the nozzle is horizontal and facing the tool direction, and the nozzle rotation angle is Finally, the nozzle is directed toward the tip of the tool. ,so .

[0113] Step S5: the motor 4 of the execution module 1 controls the rotation of the nozzle 5 according to the nozzle rotation angle;

[0114] Generally, the motor 4 rotates according to the nozzle angle By controlling the rotation of the nozzle 5, the tip of the tool and the hot part of the tool above can be covered. Considering that the tip of the tool will change according to the depth of milling, the sweep angle can be preset through the human-machine interface module. , control the nozzle of the execution module 1 within the set angle range Reciprocating motion inside.

[0115] Step S6: repeating the above steps 2 to 5 according to the preset first threshold frequency, dynamically adjusting the rotation of the nozzle 5, and performing a sweeping spray through the nozzle 5 into the axial working range of the tool.

[0116] Among them, the first threshold repetition frequency can be set to 1h. Furthermore, when the first threshold repetition frequency time is reached, since the camera of the camera assembly 7 is close to the tool, the cutting fluid splashes on the tool and produces fine water mist attached to the camera, which will make it impossible to locate the tool position. Therefore, at this time, the nozzle 5 of the execution module 1 is controlled by the main control module 3 to rotate upward to exceed the position of the camera assembly 7, and the nozzle 5 drives the scraper to rotate. When the scraper of the scraper moves to the camera assembly 7 area, it can clean the left and right camera lenses, thereby cleaning the left and right camera lenses.

[0117] The present embodiment provides a method and device for adaptively controlling a cutting fluid nozzle of a CNC machining center. The method and device are configured by setting an independent and conveniently installed execution module, a human-machine interface module, and a main control module. The cutting fluid nozzle is set on the execution module, and the execution module collects tool images in real time through an externally set binocular camera assembly or sends a nozzle rotation angle instruction to the main control module in the manual control mode of the human-machine interface module. The cutting fluid is sprayed by rotating the nozzle to achieve cooling and cleaning of the tool. The present embodiment provides a method and device for adaptively controlling a cutting fluid nozzle of a CNC machining center. The method and device can provide users with more flexible and convenient cutting fluid spray control mode selection, and the method is easy to install and widely adaptable to various types of CNC machining centers, and the accuracy of identifying cutting fluid spray on tools is higher.

[0118] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A cutting fluid nozzle adaptive control device for a CNC machining center, comprising an execution module (1), a human-machine interface module (2), and a main control module (3), characterized in that: The execution module (1) collects the tool image in real time through an externally arranged camera assembly (7), and drives the nozzle (5) near the end to rotate through an internally arranged motor (4), wherein the camera assembly (7) includes two cameras, and the two cameras are horizontally installed on the side of the tooling fixture (6) at a preset distance; The execution module (1) further comprises a fixture (6), wherein the execution module (1) is mounted on the edge of a main shaft of a machining center via the top surface of the fixture (6), and the camera assembly (7) is mounted on the side of the fixture (6) close to the main shaft of the machining center. The cutting fluid is connected to the cutting fluid inlet of the execution module (1) via a hose and sprayed out from the nozzle (5); The upper mounting surface of the fixture (6) is mounted on the edge of the main shaft of the machining center by magnetic attraction; The number of the execution modules (1) is greater than or equal to 1. When the number of the execution modules (1) is greater than 1, the execution modules (1) are evenly arranged at equal angles along the main axis of the machining center; The human-machine interface module (2) is used to realize the switching between automatic and manual control modes, and in the manual control mode, sends a nozzle rotation angle instruction to the main control module (3); The main control module (3) controls the rotation angle of the nozzle (5) according to the control mode setting state received from the human-machine interface module (2). In the automatic control mode, the main control module (3) receives and processes the tool image collected in real time by the execution module (1) and generates instructions to drive the motor (4) provided inside the execution module (1) to rotate; The nozzle (5) has two motion modes, namely, fixed and sweeping. In the fixed motion mode, the main control module (3) controls the nozzle of the execution module (1) to rotate to a specified angle by receiving angle data sent by the human-machine interface module (2) or by receiving and processing a tool image collected in real time by the execution module (1) and generating angle data. In the sweeping motion mode, the main control module (3) controls the nozzle of the execution module (1) to reciprocate within a set angle range by receiving center angle and sweeping angle data sent by the human-machine interface module (2) or by receiving and processing a tool image collected in real time by the execution module (1) and generating angle data. The cutting fluid is swept and sprayed along the axial working range of the tool through the nozzle (5); A clamp is provided at one end of the nozzle (5) away from the nozzle liquid outlet and is connected to a scraper brush, wherein the scraper brush is used to clean the outer surface of the camera of the camera assembly (7) after the nozzle (5) rotates at a certain angle.

2. The cutting fluid nozzle adaptive control device for a CNC machining center according to claim 1, characterized in that: The human-machine interface module (2) is independently installed next to the operation panel of the CNC machining center, and the main control module (3) is independently installed in the control cabinet of the CNC machining center only as a control unit of the cutting fluid nozzle.

3. The cutting fluid nozzle adaptive control device for a CNC machining center according to claim 2, characterized in that: The human-machine interface module (2) comprises a center angle adjustment knob (8), a sweep range adjustment knob (9), a control mode switching button (10), and an LCD display screen (11); the center angle adjustment knob (8) is used to adjust the rotation angle of the nozzle (5) in the manual mode; the sweep range adjustment knob (9) is used to set the sweep angle range of the nozzle (5) in the manual mode; the control mode switching button (10) is used to switch between automatic and manual control modes; and the LCD display screen (11) is used to display nozzle (5) adjustment information and actual angle status information.

4. The cutting fluid nozzle adaptive control device for a CNC machining center according to claim 1, characterized in that: The main control module (3) comprises an execution module communication interface (301), a machining center data communication interface (302), and a human-machine interface module communication interface (303), which respectively realize communication connections with the motor (4) of the execution module (1), the machining center database, and the human-machine interface module (2), wherein the communication connection with the execution module (1) and the machining center data communication interface is a wired or wireless connection, and the communication connection with the human-machine interface module (2) is a wireless connection.

5. A cutting fluid nozzle adaptive control method for a CNC machining center, characterized in that: The following steps are involved: Step S1: calibrating the parameters of the camera assembly (7) using a chessboard image, wherein the parameter calibration includes internal parameter estimation, distortion correction and external parameter calculation; Step S2: the main control module (3) obtains the tool image captured by the camera assembly (7), and uses the parameter calibration result to calibrate the tool image so that the imaging planes of the left and right cameras of the camera assembly (7) are coplanar and parallel; Step S3: Define the midpoint of the left and right cameras as the coordinate origin, and obtain the spatial coordinates of the tool tip point according to the distance between the left and right cameras, the center coordinates of the tool image captured by the camera assembly (7), the position of the tool tip point in the tool image, and the focal length of the left and right cameras. As shown in the following formula: , in, and Indicates the tool tip coordinates in the left and right images; represents the x-coordinate parallax of the tool tip in the images captured by the left and right cameras; Indicates left,camera distance; Indicates the spatial z coordinate value of the tool tip in the defined coordinate system; Indicates the spatial y coordinate value of the tool tip in the defined coordinate system; Indicates the spatial x coordinate value of the tool tip in the defined coordinate system; is the image center coordinate; f is the focal length of the left and right cameras; Step S4: Obtain the nozzle rotation angle according to the distance between the left and right camera connection lines and the nozzle rotation axis and the spatial coordinates of the tool tip point; Step S5: the motor (4) of the execution module (1) controls the rotation of the nozzle (5) according to the rotation angle of the nozzle; Step S6: repeating the above steps S2 to S5 according to a preset first threshold frequency, dynamically adjusting the rotation of the nozzle (5), and performing a sweeping spray through the nozzle (5) into the axial working range of the tool; when the first threshold repetition frequency time is reached, the main control module (3) controls the nozzle (5) of the execution module (1) to rotate upward to a position exceeding the camera assembly (7), and the nozzle (5) drives the scraper to rotate. When the scraper of the scraper moves to the camera assembly (7) area, it can clean the left and right camera lenses, thereby achieving cleaning of the left and right camera lenses.

6. The cutting fluid nozzle adaptive control method for a CNC machining center according to claim 5, characterized in that: The intrinsic parameter estimation, distortion correction and extrinsic parameter calculation in step S1 are specifically as follows: The intrinsic parameter estimation includes the focal lengths of the left and right cameras along the x-axis and the y-axis, and the center coordinates of the images captured by the left and right cameras; The distortion correction includes radial distortion coefficient and tangential distortion coefficient; The external parameter calculation includes the calculation of the rotation matrix and the translation vector between the left and right cameras; The spatial coordinates of the tool tip point obtained in step S3 are specifically: According to the distance between the left and right cameras, the x-coordinate parallax of the tool tip in the images obtained by the left and right cameras, and the focal lengths of the left and right cameras, the z-axis coordinate of the tool tip is obtained; The x-axis coordinate of the tool tip point is obtained according to the difference between the x-coordinate of the tool tip point in the image obtained by the left camera and the x-coordinate of the center of the image obtained by the left camera, the z-axis coordinate of the tool tip point, the focal lengths of the left and right cameras, and the distance between the left and right cameras; The z-axis coordinate of the tool tip point is obtained based on the difference between the y-coordinate of the tool tip point in the image obtained by the left camera and the y-coordinate of the image center obtained by the left camera, the z-axis coordinate of the tool tip point, and the focal lengths of the left and right cameras.

Citation Information

Patent Citations

  • Binocular camera calibration method and device and terminal equipment

    CN112070845A

  • Chip removal and cleaning system for machine tool machining and control method of chip removal and cleaning system

    CN115890328A

  • Ultra-precision cutting self-adaptive cooling and lubricating device and method

    CN118720837A