Machine tool collision early warning method and system based on data analysis
By building a virtual machine tool model and combining the hierarchical bounding box tree and ray intersection algorithm, the detection accuracy and efficiency problems in machine tool collision warning are solved, and efficient and accurate collision warning are achieved.
Patent Information
- Application Number
- CN202511056187.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-09-02
AI Technical Summary
The existing machine tool collision warning technology cannot effectively consider the precise position and motion constraints of machine tool components in dynamic states, resulting in low accuracy of collision detection, easy to miss and false alarms, and serious waste of computing resources.
By obtaining the image data, geometric data and motion constraint data of the machine tool, a virtual model of the machine tool is constructed, and preliminary collision inspection is performed using the hierarchical bounding box tree algorithm, and fine collision detection is performed in combination with the ray intersection algorithm to screen out potential collision targets and issue an alarm.
It improves the accuracy of collision detection, reduces missed and false alarms, optimizes computing efficiency, avoids resource waste, and improves production efficiency.
Smart Images

Figure CN120572391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a machine tool collision warning method and system based on data analysis. Background Art
[0002] With the rapid development of modern manufacturing, CNC machine tools, as core equipment for automated production, have been widely used in machining, precision manufacturing, and other fields. However, during complex machining processes, machine tool collisions are prone to occur due to improper operation, program errors, or equipment failures. This not only causes equipment damage but can also seriously impact workpiece quality and production efficiency. Therefore, how to monitor machine tool operating status in real time, predict potential collision risks, and take preventive measures has become a pressing issue in modern manufacturing.
[0003] Current machine tool collision warning technologies fall into two main categories: hardware-based monitoring and software-based predictive algorithms. Hardware-based monitoring technologies employ sensors, accelerometers, and other devices to monitor the machine tool's motion status and the relative position of the workpiece and tool in real time. These data are analyzed to determine whether there is a risk of collision. The other category involves CNC system-based early warning methods. These utilize motion control data from CNC machine tools and algorithmic models to analyze machining paths and predict collisions. These technologies can improve machine tool safety and reduce accidents to a certain extent.
[0004] However, existing methods fail to effectively consider the precise position and motion constraints of machine tool components in dynamic states, making it difficult to achieve highly accurate collision detection and prone to missed and false positives. Furthermore, the collision detection process still involves repeated checks, wasting significant computing resources and resulting in low processing efficiency. Summary of the Invention
[0005] In view of the above shortcomings of the existing technology, the purpose of the embodiments of the present invention is to provide a machine tool collision warning method based on data analysis. This method can address the technical problem that existing technical methods cannot effectively consider the precise position and motion constraints of machine tool components in a dynamic state, thus making it difficult to achieve high-accuracy collision detection and prone to missed and false alarms. At the same time, the collision detection process still involves repeated detection, which wastes a large amount of computing resources and leads to low processing efficiency.
[0006] A first aspect of an embodiment of the present invention provides a machine tool collision warning method based on data analysis, comprising: S1: Acquire image data, geometric data of a machine tool, and motion constraint data of each machine tool component in the machine tool; S2: Processing the image data to determine the precise position of each machine tool component in the machine tool; S3: constructing a virtual model of the machine tool based on the precise position of each machine tool component in the machine tool, combined with the geometric data of the machine tool and the motion constraint data of each machine tool component; S4: establishing a hierarchical bounding box tree for each machine tool component in the machine tool virtual model, wherein the hierarchical bounding box tree includes bounding boxes of multiple machine tool components; S5: performing a preliminary collision check on each machine tool component in the machine tool virtual model using a hierarchical bounding box tree algorithm, and screening out target machine tool components corresponding to intersecting bounding boxes in the hierarchical bounding box tree; S6: performing a fine collision check on the target machine tool component by using a ray intersection algorithm; S7: Based on the result of the fine collision check, determine whether the target machine tool components collide with each other; if so, issue a collision alarm; otherwise, determine that no collision occurs.
[0007] A second aspect of an embodiment of the present invention provides a machine tool collision warning system based on data analysis, comprising: a processor and a memory; The memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the machine tool collision warning method based on data analysis as described in the first aspect are implemented.
[0008] According to a third aspect of an embodiment of the present invention, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the machine tool collision warning method based on data analysis as described in the first aspect are implemented.
[0009] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: In this embodiment, by acquiring machine tool image data, geometric data, and motion constraint data for its components, and combining this information to construct a virtual model of the machine tool, the precise position and motion constraints of the components in their dynamic state are fully considered. This improves the accuracy of collision detection and reduces missed and false positives. By establishing a hierarchical bounding box tree and performing preliminary collision checks based on this tree, target components that may collide are screened. Further refined collision detection is performed using a ray intersection algorithm, avoiding the waste of computing resources and improving computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments of the present invention. It is clear that those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0011] Figure 1 1 is a flow chart of a machine tool collision warning method based on data analysis provided by an embodiment of the present invention; Figure 2 The present invention provides a structural diagram of a machine tool collision warning system based on data analysis. DETAILED DESCRIPTION
[0012] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present invention.
[0013] The machine tool collision warning method based on data analysis provided by the embodiment of the present invention is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
[0014] Reference Manual Figure 1 , which shows a flow chart of a machine tool collision warning method based on data analysis provided by an embodiment of the present invention.
[0015] An embodiment of the present invention provides a machine tool collision warning method based on data analysis, which may include the following steps: S1: Acquire the image data, geometric data and motion constraint data of each machine tool component in the machine tool.
[0016] In a possible implementation, S1 specifically includes: S101: Acquire image data of a machine tool through an industrial CCD camera.
[0017] Industrial CCD cameras are high-precision image acquisition devices widely used in industrial automation, quality control, measurement, robotic vision, object recognition, and other fields. Their core component is the CCD (Charge-Coupled Device) sensor, a sensor technology used to capture images. It converts light signals into electrical signals and outputs them as digital images. Industrial CCD cameras, with their high-quality imaging capabilities, play a vital role in precision measurement, defect detection, and other industrial applications.
[0018] It should be noted that the image data of the machine tool includes information about the fixture, tool and workpiece components in the machine tool.
[0019] S102: Obtain the geometric data of the machine tool through the technical manual of the machine tool.
[0020] Among them, a technical manual is a document that contains detailed technical information, specifications, operating procedures, installation instructions, and maintenance requirements for a product, equipment, system, tool, or process.
[0021] S103: Obtain motion constraint data of each component in the machine tool through the numerical control program of the machine tool.
[0022] A numerical control program (NC program) is a set of instructions used to control CNC machine tools (such as milling machines, lathes, and laser cutters) to perform automated operations. Through a series of preset codes and instructions, a NC program tells the machine tool how to perform a specific task, such as cutting, engraving, drilling, or grinding. It is based on a numerical control system (CNC system) to achieve automated operations and improve precision, efficiency, and consistency.
[0023] In the embodiment of the present invention, the high-precision imaging of the CCD camera can help accurately identify the position and shape of the workpiece, fixture, and tool. Combining the geometric data of the machine tool with the motion constraint data of each component provides a solid foundation for building a virtual model of the machine tool.
[0024] S2: Process the image data to determine the precise position of each machine tool component in the machine tool.
[0025] In a possible implementation, S2 specifically includes sub-steps S201 to S204: S201: Using the Canny edge detection algorithm, the boundaries and contours of each machine tool component in the machine tool are extracted from the image data, and each machine tool component is accurately positioned in combination with the Hough transform.
[0026] The Canny edge detection algorithm is a classic and effective edge detection method widely used in image analysis. Its purpose is to identify areas in an image where image intensity changes significantly, which usually represent the boundaries or outlines of objects.
[0027] The Hough transform is a classic image processing technique used to detect geometric shapes from images, particularly lines, circles, and other parameterized shapes. It is a mapping method from image space to parameter space that can effectively extract shapes.
[0028] Optionally, the steps of the Canny edge detection algorithm specifically include: Smooth the image using a Gaussian filter: ; in, G ( x , y ) represents the position in the smoothing kernel ( x , y ), ( x , y ) represents the coordinates of the pixel point, σ represents standard deviation, exp represents exponential function.
[0029] Use the Sobel operator to calculate the smoothed image. x Direction and y Gradient in direction: ; in, G x Indicates that the image is x The gradient in direction, represents the partial derivative, I represents the grayscale value of the image, G y Indicates that the image is y Gradient in direction.
[0030] Based on the smoothed image x Direction and y Gradient in the direction, calculate edge strength and gradient direction: ; in, G Represents a pixel ( x , y ), θ represents the gradient direction, Represents the inverse tangent function.
[0031] For each pixel, check its gradient value in the edge direction and the gradient values of the two surrounding pixels, and set the pixels whose gradient values are not the local maximum to zero.
[0032] By setting high and low thresholds, strong edges, weak edges, and non-edge areas can be distinguished.
[0033] Connect weak edges to strong edges of the boundaries and contours of each machine tool component.
[0034] In the embodiment of the present invention, the Canny edge detection algorithm can clearly distinguish strong edges from weak edges in an image, thereby improving the accuracy and reliability of edges.
[0035] S202: Using a feature point matching method, find the same feature points between images at different viewing angles to form image feature point pairs.
[0036] Specifically, the SIFT or SURF algorithm is used to extract feature points from two images with different perspectives, and the corresponding feature point pairs in the two images are found through feature point matching. Each matching pair represents the same point of the same object.
[0037] In the embodiment of the present invention, feature point matching can be used to find the same points of the same object under different viewing angles, thereby overcoming the problem of position information loss caused by viewing angle changes.
[0038] S203: Depth information is obtained using triangulation based on the image feature point pairs to determine the local coordinate position of each machine tool component.
[0039] Triangulation is a classic method for calculating the position of an object in three-dimensional space, particularly common in computer vision and 3D reconstruction. Triangulation uses geometric principles to infer an object's 3D coordinates (depth information) from corresponding feature points in images acquired from two different viewpoints (usually two cameras or sensors). This method, based on the geometric principle of triangles, recovers depth by calculating the parallax of corresponding points.
[0040] Optionally, calculate depth information based on the focal length of the camera and the baseline distance between the two cameras: ; in, Z Indicates depth, f represents the focal length, b represents the baseline distance, d Represents the disparity of corresponding feature points in two images.
[0041] In the camera coordinate system, based on the depth information, calculate the horizontal and vertical coordinates of the corresponding feature points: ; ; in, X Represents the horizontal coordinate of the object in three-dimensional space, Y Represents the vertical coordinate of the object in three-dimensional space, ( x 1, y 1) represents the pixel coordinates of a point in the image, ( c x , c y ) represents the principal point coordinates of the camera.
[0042] Then we get the local coordinate position (X , Y , Z ).
[0043] In an embodiment of the present invention, by calculating depth information, the local coordinate position of the machine tool component in three-dimensional space can be accurately obtained, providing accurate data for subsequent virtual modeling, collision detection and other tasks.
[0044] S204: Convert the local coordinate position of each machine tool component into a global coordinate position in the global coordinate system through coordinate transformation, so as to obtain the precise position of each machine tool component in the machine tool.
[0045] Coordinate transformation refers to the process of converting coordinate points in one coordinate system to another. It is usually applied in three-dimensional space to adapt to different perspectives, reference frames, or coordinate systems.
[0046] In the embodiment of the present invention, the entire process ensures the accuracy of the position data by accurately extracting the boundaries of the machine tool components, obtaining the depth information of the object through feature point matching, and finally achieving local to global coordinate conversion.
[0047] S3: Based on the precise position of each machine tool component in the machine tool, combined with the machine tool's geometric data and the motion constraint data of each machine tool component, a virtual model of the machine tool is constructed.
[0048] Specifically, the geometric data, precise positions, and motion constraints of machine tool components are integrated together. 3D modeling software is used to combine the geometric shape and position data of each component and place it in a suitable space, ensuring that its physical position is consistent with that in the actual machine tool. Based on the motion constraint data, corresponding motion restrictions are added to the virtual machine tool model to simulate the motion trajectory of each machine tool component during operation, ensuring that the virtual machine tool does not collide or exceed the set range during operation. The precise position of each component is determined through image data, and the actual three-dimensional model is constructed in combination with the geometric data. Motion constraints are then used to ensure the motion restrictions of each component. The constructed virtual machine tool model will be very close to the behavior of the actual machine tool.
[0049] S4: establishing a hierarchical bounding box tree for each machine tool component in the machine tool virtual model, wherein the hierarchical bounding box tree includes bounding boxes of multiple machine tool components.
[0050] The Bounding Volume Hierarchy (BVH) is a spatial hierarchical structure commonly used in collision detection and graphics rendering. It improves collision detection and rendering efficiency by decomposing complex objects into a series of bounding volumes (Bounding Volumes) and organizing these bounding volumes into a hierarchical structure. The BVH is particularly suitable for fast processing of 3D objects or complex scenes and is widely used in computer graphics, physics simulation, and virtual reality.
[0051] In this embodiment of the present invention, an object is decomposed into multiple levels of bounding boxes using a BVH structure. During the detection process, whether the bounding boxes intersect is first determined. If the bounding boxes of a parent node do not intersect, all child nodes under that bounding box can be skipped, thereby reducing unnecessary intersection detection.
[0052] S5: Perform preliminary collision checks on each machine tool component in the machine tool virtual model through the hierarchical bounding box tree algorithm, and filter out the target machine tool components corresponding to the bounding boxes that intersect in the hierarchical bounding box tree.
[0053] The Bounding Volume Hierarchy (BVH) algorithm is a spatial acceleration structure commonly used in collision detection and graphics rendering, particularly in computer graphics and physics simulation. This algorithm accelerates operations such as collision detection and ray tracing between objects by constructing a multi-level bounding box tree. It nests objects in a scene layer by layer within bounding boxes, organizing them into a tree-like structure to improve efficiency.
[0054] In a possible implementation, S5 specifically includes sub-steps S501 to S505: S501: Create a bounding box for each machine tool component in the machine tool virtual model.
[0055] S502: Based on the bounding boxes of the respective machine tool components, a single tree structure is created for each machine tool component in the machine tool virtual model, wherein each tree node of the tree structure represents a bounding box and corresponds to a machine tool component.
[0056] S503: Building a tree structure in a top-down manner according to each tree structure to form a hierarchical bounding box tree.
[0057] S504: Traverse the bounding box tree and perform an intersection test on each bounding box to determine whether the bounding boxes of each parent node intersect. If so, perform an intersection test on each child node under the parent node until all child nodes have been tested. Otherwise, skip testing the child nodes corresponding to the parent node.
[0058] Optionally, the intersection test specifically includes: determining two bounding boxes R 1 and R 2. Their minimum and maximum coordinates are: ; ; ; in, R 1 represents the bounding box R 1, R 2 represents the bounding box R 2, x min1 , y min1 , z min1 Represents a bounding box R 1 is the minimum value in three directions, x max1 , y max1 , z max1 Represents a bounding box R 1 is the maximum value in three directions, x min2 , y min2 , z min2 Represents a bounding box R 2 is the minimum value in three directions, x max2 , y max2 , z max2 Represents a bounding box R 2 is the maximum value in three directions, and NOintersection means no intersection.
[0059] S505: Integrate the machine tool components corresponding to the bounding boxes of the intersecting sub-nodes to form a target machine tool component.
[0060] Specifically, the root node (parent node) of the tree is first tested for intersection. If the parent node's bounding box intersects with the bounding boxes of other objects, it indicates that certain components contained within the parent node may collide. At this point, we proceed to the next step, testing the child nodes. If the parent node's bounding box does not intersect with other objects, then, due to the optimization properties of the BVH algorithm, we can skip collision checking for all child nodes under that parent node, as their bounding boxes are guaranteed not to intersect with other objects either. This reduces unnecessary computation and improves collision detection efficiency. If the parent node's bounding box intersects, we proceed to perform an intersection test on each of the parent node's child nodes. If the bounding boxes of child nodes intersect, this indicates that the components corresponding to those child nodes may collide, and we further filter these components for refined collision testing. During the traversal process, if the bounding boxes of child nodes intersect, we continue to perform intersection checks on the child nodes' children until there are no more child nodes or all child nodes have been tested.
[0061] In this embodiment of the present invention, a hierarchical bounding box tree is constructed from top to bottom, with each level's bounding boxes representing a larger range of objects. As long as the bounding boxes in the upper level do not intersect, all sub-bounding boxes in the lower level are skipped. This significantly reduces the number of collision checks between objects and improves computational efficiency.
[0062] S6: Perform detailed collision checks on target machine tool components using a ray intersection algorithm.
[0063] The ray intersection algorithm is widely used in computer graphics, physical simulation, collision detection, and 3D reconstruction. Its core task is to determine whether a ray intersects an object and calculate the location of the intersection.
[0064] In a possible implementation, S6 specifically includes sub-steps S601 to S604: S601: Set the starting point and direction of the ray, and determine the ray equation: ; in, P ( t ) represents the position of a point on the ray, O represents the starting point of the ray, t Indicates parameters, A vector representing the direction of the ray.
[0065] S602: Determine vertex coordinates and normal vectors of a triangle mesh in a target machine tool component.
[0066] It should be noted that the 3D shape of a machine tool component is represented as a triangular mesh. The mesh is composed of multiple triangles, each defined by three vertices and a normal vector. The data for the triangular mesh is obtained through CAD.
[0067] Optionally, the calculation formula of the normal vector is specifically: ; in, N represents the normal vector, represents the vector cross product, V 1, V 2, V 3 represents the three vertices of the triangle.
[0068] S603: Determine the intersection point where the ray intersects the triangle mesh based on the vertex coordinates, the normal vector, and the ray equation.
[0069] In a possible implementation, S603 specifically includes sub-steps S6031 to S6032: S6031: Determine the plane equation of the triangle mesh based on vertex coordinates and normal vectors: ; in, P represents any point on the plane.
[0070] S6032: Substitute the ray equation into the plane equation to determine the intersection point where the ray intersects the triangle mesh.
[0071] Alternatively, substituting the ray equation into the plane equation yields: ; if t If it is greater than 0, the ray and the plane have an intersection point, and the intersection point is .
[0072] if t If it is less than or equal to 0, the ray has no intersection with the plane.
[0073] S604: Determine whether the intersection point is within the boundary of the triangular mesh. If so, determine that a collision has occurred. Otherwise, continue to detect the remaining target machine tool components.
[0074] In an embodiment of the present invention, by calculating the intersection of a ray and a triangular plane and further determining whether the intersection is within the boundary of the triangle, the intersection position of the ray and the target machine tool component can be accurately determined. Compared with simple bounding box collision detection, this method can take into account more complex shapes (such as triangular meshes), ensuring high accuracy and high reliability of collision detection. At the same time, the ray intersection algorithm divides the triangular mesh of the target machine tool component into multiple separate triangles and detects them one by one, ensuring that further calculations are only performed when a potential collision occurs. By using staged detection (such as first determining the intersection of the ray and the plane, and then determining whether it is within the triangle), the amount of calculation can be significantly reduced, avoiding unnecessary collision checks on unrelated components.
[0075] S7: Based on the detailed collision check results, determine whether each target machine tool component has collided. If so, issue a collision alarm. Otherwise, determine that no collision has occurred.
[0076] In a possible implementation, issuing the collision alarm in S7 specifically includes: A collision warning light is used to warn the aircraft.
[0077] A collision alarm is issued through a buzzer alarm.
[0078] In this embodiment of the present invention, the alarm system can reduce downtime in the production process by preventing collisions between machine tool components. When the system identifies collision risks in advance and issues an alarm, operators can intervene in time, avoiding large-scale production interruptions and improving production efficiency.
[0079] In a possible implementation manner, after S7, the method further includes: Alert management to handle the collision alarm.
[0080] Specifically, managers can quickly view alarm information, assess the severity of the accident, and take appropriate emergency measures, such as suspending machine operation, checking faulty parts, or adjusting machine operation to prevent further damage or accidents.
[0081] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: In this embodiment of the present invention, by acquiring machine tool image data, geometric data, and motion constraint data of machine tool components, and combining this information to construct a virtual model of the machine tool, the precise position and motion constraints of the machine tool components in a dynamic state are fully considered, thereby improving the accuracy of collision detection and reducing the occurrence of missed and false positives. By establishing a hierarchical bounding box tree and performing preliminary collision checks based on this tree, target components that may collide are screened. Further refined collision detection is performed using a ray intersection algorithm, avoiding the waste of computing resources and improving computational efficiency.
[0082] Reference Manual Figure 2 , which shows a structural diagram of a machine tool collision warning system based on data analysis provided by an embodiment of the present invention.
[0083] The embodiment of the present invention provides a machine tool collision warning system 20 based on data analysis, comprising: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can be run on the processor 201. When the programs or instructions are executed by the processor 201, the steps of the above-mentioned machine tool collision warning method based on data analysis are implemented, and the same technical effect can be achieved. To avoid repetition, the present invention will not be described in detail.
[0084] It should be understood that the processor 201 in the embodiment of the present invention may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0085] It should also be understood that the memory 202 in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0086] The above embodiments can be implemented in whole or in part via software, hardware (e.g., circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are fully or partially performed. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.
[0087] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0088] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0089] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0090] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.
[0091] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0092] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0093] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0094] An embodiment of the present invention provides a readable storage medium including: a program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the above-mentioned machine tool collision warning method based on data analysis are implemented, and the same technical effect can be achieved. To avoid repetition, the present invention will not be described in detail.
[0095] Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and such modifications or replacements do not deviate from the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be covered by the scope of protection of the present invention.
Claims
1. A machine tool collision warning method based on data analysis, characterized in that: include: S1: Acquire image data, geometric data of a machine tool, and motion constraint data of each machine tool component in the machine tool; S2: Processing the image data to determine the precise position of each machine tool component in the machine tool; S3: constructing a virtual model of the machine tool based on the precise position of each machine tool component in the machine tool, combined with the geometric data of the machine tool and the motion constraint data of each machine tool component; S4: establishing a hierarchical bounding box tree for each machine tool component in the machine tool virtual model, wherein the hierarchical bounding box tree includes bounding boxes of multiple machine tool components; S5: performing a preliminary collision check on each machine tool component in the machine tool virtual model using a hierarchical bounding box tree algorithm, and screening out target machine tool components corresponding to intersecting bounding boxes in the hierarchical bounding box tree; S6: performing a fine collision check on the target machine tool component by using a ray intersection algorithm; S7: Based on the result of the fine collision check, determine whether each of the target machine tool components has collided; if so, issue a collision alarm; otherwise, determine that no collision has occurred.
2. The machine tool collision warning method based on data analysis according to claim 1 is characterized in that: Said S1 specifically includes: S101: Acquire image data of the machine tool through an industrial CCD camera; S102: Acquire geometric data of the machine tool through the technical manual of the machine tool; S103: Obtaining motion constraint data of each machine tool component in the machine tool through the numerical control program of the machine tool.
3. The machine tool collision warning method based on data analysis according to claim 2 is characterized in that: The S2 specifically includes: S201: using the Canny edge detection algorithm to extract the boundaries and contours of each machine tool component in the machine tool from the image data, and combining the Hough transform to accurately locate each machine tool component; S202: using a feature point matching method, finding the same feature points between images at different viewing angles to form image feature point pairs; S203: obtaining depth information using triangulation based on the image feature point pairs, and determining the local coordinate position of each of the machine tool components; S204: Converting the local coordinate position of each machine tool component into a global coordinate position in a global coordinate system through coordinate transformation to obtain the precise position of each machine tool component in the machine tool.
4. The machine tool collision warning method based on data analysis according to claim 1 is characterized in that: S5 specifically includes: S501: Creating a bounding box for each machine tool component in the machine tool virtual model; S502: Creating a single tree structure for each machine tool component in the machine tool virtual model based on the bounding box of each machine tool component, wherein each tree node of the tree structure represents a bounding box corresponding to a machine tool component; S503: constructing a tree structure in a top-down manner according to each of the tree structures to form a hierarchical bounding box tree; S504: By traversing the hierarchical bounding box tree, performing an intersection test on each of the bounding boxes to determine whether the bounding boxes of each parent node intersect; if so, performing an intersection test on each child node under the parent node until all child nodes are tested; otherwise, skipping the test on the child nodes corresponding to the parent node; S505: Integrate the machine tool components corresponding to the bounding boxes of the intersecting sub-nodes to form the target machine tool component.
5. The machine tool collision warning method based on data analysis according to claim 1 is characterized in that: The S6 specifically includes: S601: Set the starting point and direction of the ray and determine the ray equation; S602: Determine vertex coordinates and normal vectors of a triangle mesh in the target machine tool component; S603: Determine, based on the vertex coordinates, the normal vector, and the ray equation, a position of an intersection point where the ray intersects the triangular mesh; S604: Determine whether the intersection point is within the boundary of the triangular mesh; if so, determine that a collision occurs; otherwise, continue to detect the remaining target machine tool components.
6. The machine tool collision warning method based on data analysis according to claim 5 is characterized in that: The S603 specifically includes: S6031: Determine a plane equation of the triangular mesh based on the vertex coordinates and the normal vector; S6032: Substitute the ray equation into the plane equation to determine the intersection point where the ray intersects with the triangular mesh.
7. The machine tool collision warning method based on data analysis according to claim 5 is characterized in that: The collision alarm in S7 is specifically issued as follows: issuing the collision warning via a warning light; The collision alarm is issued through a buzzer alarm.
8. The machine tool collision warning method based on data analysis according to claim 1 is characterized in that: After S7, the method further includes: Alert management personnel to handle the collision alarm.
9. A machine tool collision warning system based on data analysis, characterized in that: include: processor and memory; The memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the machine tool collision warning method based on data analysis as described in any one of claims 1 to 8 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the machine tool collision warning method based on data analysis as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Real-time anti-collision method for numerically-controlled machine tool
CN106202767A
Real-time cutter anti-collision method in numerical control machine tool machining process
CN114428480A
Three-dimensional collision detection early warning system and method based on digital twinning
CN116680858A
Multi-axis numerical control machine tool safety production prediction and early warning method based on digital twinning
CN117252901A
Machine tool digital twin system based on virtual-real interaction and development method thereof
CN118153346A