CN111975438A - Machine tool emergency stop method and device based on distance sensor and machine vision - Google Patents
Machine tool emergency stop method and device based on distance sensor and machine vision Download PDFInfo
- Publication number
- CN111975438A CN111975438A CN202010847699.0A CN202010847699A CN111975438A CN 111975438 A CN111975438 A CN 111975438A CN 202010847699 A CN202010847699 A CN 202010847699A CN 111975438 A CN111975438 A CN 111975438A
- Authority
- CN
- China
- Prior art keywords
- jaw chuck
- distance
- foreign object
- emergency stop
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 27
- 238000010801 machine learning Methods 0.000 claims abstract description 13
- 238000001514 detection method Methods 0.000 claims description 18
- 238000004458 analytical method Methods 0.000 claims description 13
- 238000013528 artificial neural network Methods 0.000 claims description 12
- 238000007781 pre-processing Methods 0.000 claims description 9
- 230000009467 reduction Effects 0.000 claims description 7
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000013135 deep learning Methods 0.000 claims description 6
- 238000003708 edge detection Methods 0.000 claims description 3
- 238000012549 training Methods 0.000 claims description 3
- 206010070245 Foreign body Diseases 0.000 description 55
- ZOKXTWBITQBERF-UHFFFAOYSA-N Molybdenum Chemical compound [Mo] ZOKXTWBITQBERF-UHFFFAOYSA-N 0.000 description 7
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000004804 winding Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23Q—DETAILS, COMPONENTS, OR ACCESSORIES FOR MACHINE TOOLS, e.g. ARRANGEMENTS FOR COPYING OR CONTROLLING; MACHINE TOOLS IN GENERAL CHARACTERISED BY THE CONSTRUCTION OF PARTICULAR DETAILS OR COMPONENTS; COMBINATIONS OR ASSOCIATIONS OF METAL-WORKING MACHINES, NOT DIRECTED TO A PARTICULAR RESULT
- B23Q11/00—Accessories fitted to machine tools for keeping tools or parts of the machine in good working condition or for cooling work; Safety devices specially combined with or arranged in, or specially adapted for use in connection with, machine tools
- B23Q11/0078—Safety devices protecting the operator, e.g. against accident or noise
- B23Q11/0092—Safety devices protecting the operator, e.g. against accident or noise actuating braking or stopping means
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23B—TURNING; BORING
- B23B31/00—Chucks; Expansion mandrels; Adaptations thereof for remote control
- B23B31/02—Chucks
- B23B31/10—Chucks characterised by the retaining or gripping devices or their immediate operating means
- B23B31/103—Retention by pivotal elements, e.g. catches, pawls
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23Q—DETAILS, COMPONENTS, OR ACCESSORIES FOR MACHINE TOOLS, e.g. ARRANGEMENTS FOR COPYING OR CONTROLLING; MACHINE TOOLS IN GENERAL CHARACTERISED BY THE CONSTRUCTION OF PARTICULAR DETAILS OR COMPONENTS; COMBINATIONS OR ASSOCIATIONS OF METAL-WORKING MACHINES, NOT DIRECTED TO A PARTICULAR RESULT
- B23Q11/00—Accessories fitted to machine tools for keeping tools or parts of the machine in good working condition or for cooling work; Safety devices specially combined with or arranged in, or specially adapted for use in connection with, machine tools
- B23Q11/0078—Safety devices protecting the operator, e.g. against accident or noise
- B23Q11/0089—Safety devices protecting the operator, e.g. against accident or noise actuating operator protecting means, e.g. closing a cover element, producing an alarm signal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
Landscapes
- Engineering & Computer Science (AREA)
- Mechanical Engineering (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
本发明公开了一种基于距离传感器及机器视觉的机床急停方法,包括以下步骤:S1加工开始前,利用机器学习算法对不同类型的异物图像数据进行训练学习以及获取无异物时三爪卡盘边缘点集合从而得到三爪卡盘的中心位置;S2加工开始后,获取距离传感器测量的当前距离以及三爪卡盘周边的图像;S3对比当前距离和距离阈值,判断是三爪卡盘的安全距离内是否存在异物,若安全距离内存在异物进入S5,若安全距离内不存在异物进入S4;S4利用机器视觉算法对图像进行分析,判断是三爪卡盘的安全距离内是否存在属于急停范畴的异物,若安全距离内存在属于急停范畴的异物进入S5,若安全距离内不存在属于急停范畴的异物进入S2;S5机床立即报警同时停止工作。
The invention discloses a machine tool emergency stop method based on a distance sensor and machine vision, comprising the following steps: before starting the S1 processing, use a machine learning algorithm to train and learn different types of foreign object image data, and obtain a three-jaw chuck when there is no foreign object. The edge points are collected to obtain the center position of the three-jaw chuck; after the S2 processing starts, the current distance measured by the distance sensor and the image around the three-jaw chuck are obtained; S3 compares the current distance and the distance threshold, and judges that the three-jaw chuck is safe Whether there is a foreign object within the distance, if there is a foreign object within the safe distance, enter S5, and if there is no foreign object within the safe distance, enter S4; S4 uses machine vision algorithms to analyze the image to determine whether there is an emergency stop within the safe distance of the three-jaw chuck If there is a foreign object belonging to the emergency stop category within the safety distance, it will enter S5. If there is no foreign object belonging to the emergency stop category within the safety distance, it will enter S2; the S5 machine will immediately alarm and stop working.
Description
技术领域technical field
本发明涉及机床安全监控技术领域,尤其涉及基于距离传感器及机器视觉的机床急停方法及装置。The invention relates to the technical field of machine tool safety monitoring, in particular to a machine tool emergency stop method and device based on distance sensors and machine vision.
背景技术Background technique
在机床生产实践中,因为操作不当而引发安全事故,特别是在机床的三爪卡盘部分。三爪卡盘高速旋转,操作人员因为疏忽导致手或者头发等靠近高速旋转的三爪卡盘,而被高速旋转的三爪卡盘将整个手部或者头部绞伤,出现重大安全事故。当发生安全事故时,被绞伤的人是无法使机械停下,且当周边的人们听到呼救声再过来按下急停开关时,伤亡已经不可避免。In the production practice of machine tools, safety accidents are caused by improper operation, especially in the three-jaw chuck part of the machine tool. The three-jaw chuck rotates at a high speed, and the operator's hand or hair is close to the high-speed rotating three-jaw chuck due to negligence, and the whole hand or head is strangled by the high-speed rotating three-jaw chuck, causing a major safety accident. When a safety accident occurs, the injured person cannot stop the machine, and when the surrounding people hear the cry for help and press the emergency stop switch, casualties are inevitable.
目前已存在的机床制动装置有:一种线切割机床钼丝断丝时的电机制动装置,线切割机床钼丝断丝检测电路由电流互感器与开关管和时基电路组成,电机交流电源的一根相线穿过电流互感器初级线圈,电流互感器次级线圈与整流稳压电路相连接,整流稳压电路与开关管和时基电路相连接,时基电路输出端与单片机输入端相连接,单片机输出端与电机制动电路相连接,电机制动电路包括开关管和继电器,继电器常开触点与一组直流电源和一组电机交流电源的相线相串接,其有益效果是通过钼丝断检测电路对钼丝运行电机运行电流的检测,在钼丝断丝时能实时启动钼丝运行电机制动电路,快速制动电机的转动且保护钼丝不受影响;另一种机床设备紧急制动装置,在机床设备急停接触器常开触点上串接一个直流电源,所述的直流电源是由变压器和整流电路组成,变压器的初级线圈两端分别连接在电动机电源两相进线和上,变压器的次级线圈两端分别连接在整流电路输入接点上,当按下急停按钮时,电动机的两个定子绕组与交流电源断开后,两个定子绕组立即与直流电源形成回路,直流电源会在定子绕组中产生一个静止磁场,转子在这个磁场中旋转产生感应电动势,转子电流与静止磁场产生相反的转矩,该转矩使设备惯性带来的转子转动力产生阻力,迫使电动机转子迅速停止转动,转子的制动力对机电设备的惯性转动力产生制动,从而完成整个制动过程。The existing machine tool braking devices include: a motor braking device when the molybdenum wire of the wire cutting machine tool is broken. The wire cutting machine tool molybdenum wire broken wire detection circuit is composed of a current transformer, a switch tube and a time base circuit. A phase line of the power supply passes through the primary coil of the current transformer, the secondary coil of the current transformer is connected to the rectifier voltage regulator circuit, the rectifier voltage regulator circuit is connected to the switch tube and the time base circuit, and the output end of the time base circuit is connected to the input of the single-chip microcomputer The output end of the single-chip microcomputer is connected to the motor braking circuit. The motor braking circuit includes a switch tube and a relay. The normally open contact of the relay is connected in series with a set of DC power supply and a set of phase lines of the motor AC power supply, which is beneficial The effect is to detect the running current of the molybdenum wire running motor through the molybdenum wire broken detection circuit, and start the molybdenum wire running motor braking circuit in real time when the molybdenum wire is broken, quickly brake the rotation of the motor and protect the molybdenum wire from being affected; An emergency braking device for machine tool equipment, a DC power supply is connected in series on the normally open contact of the machine tool equipment emergency stop contactor, the DC power supply is composed of a transformer and a rectifier circuit, and both ends of the primary coil of the transformer are respectively connected to the motor The two-phase incoming line of the power supply and the upper, both ends of the secondary coil of the transformer are respectively connected to the input contacts of the rectifier circuit. When the emergency stop button is pressed, after the two stator windings of the motor are disconnected from the AC power supply, the two stator windings are immediately connected. It forms a loop with the DC power supply. The DC power supply will generate a static magnetic field in the stator winding. The rotor rotates in this magnetic field to generate an induced electromotive force. The rotor current and the static magnetic field generate an opposite torque. The power produces resistance, forcing the rotor of the motor to stop rotating quickly, and the braking force of the rotor brakes the inertial rotation force of the electromechanical device, thereby completing the entire braking process.
上述机床的制动过程均是由是内部电流的检测来控制电动机制动电路,目前机床中现有的预警功能均是用于检测工具的放置位置是否偏移、机床中各零件是否需要维护等,无法解决根据三爪卡盘的周边情况实时精确控制机床的急停从而避免出现安全事故发生的问题。The braking process of the above-mentioned machine tools is controlled by the detection of the internal current to control the motor braking circuit. At present, the existing early warning functions in the machine tools are used to detect whether the placement position of the tool is offset and whether the parts in the machine tool need maintenance, etc. , it cannot solve the problem of accurately controlling the emergency stop of the machine tool in real time according to the surrounding conditions of the three-jaw chuck to avoid safety accidents.
发明内容SUMMARY OF THE INVENTION
针对现有技术的以上缺陷或改进需求,本发明提供一种基于超声波距离传感器及视觉的机床急停方法及装置,利用分布在三爪卡盘两侧的距离传感器检测当前距离,同时结合图像分析三爪卡盘安全距离内是否存在属于急停范畴的异物,若检测到距离传感器的当前距离小于距离阈值或者三爪卡盘安全距离内存在属于急停范畴类别的异物,则向报警模块发出报警命令,并向停机模块发出停机命令,解决了无法根据三爪卡盘的周边情况实时精确地控制机床急停从而避免出现安全事故发生的问题。In view of the above defects or improvement requirements of the prior art, the present invention provides a method and device for emergency stop of a machine tool based on ultrasonic distance sensors and vision. The distance sensors distributed on both sides of the three-jaw chuck are used to detect the current distance, and combined with image analysis Whether there is a foreign object belonging to the emergency stop category within the safety distance of the three-jaw chuck, if it is detected that the current distance of the distance sensor is less than the distance threshold or there is a foreign object belonging to the emergency stop category within the safety distance of the three-jaw chuck, an alarm will be sent to the alarm module. command and send a stop command to the stop module, which solves the problem that the emergency stop of the machine tool cannot be accurately controlled in real time according to the surrounding conditions of the three-jaw chuck to avoid safety accidents.
为了实现上述目的,本发明采用如下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
一种基于距离传感器及机器视觉的机床急停方法,包括以下步骤:A machine tool emergency stop method based on distance sensor and machine vision, comprising the following steps:
S1:加工开始前,利用机器学习算法对不同类型的异物图像数据进行训练学习以及获取无异物时三爪卡盘边缘点集合{Ci}从而得到三爪卡盘的中心位置C0;S1: before processing begins, utilize machine learning algorithm to carry out training learning to different types of foreign body image data and obtain the three-jaw chuck edge point set {C i } when there is no foreign body to obtain the center position C 0 of the three-jaw chuck;
其中(C0x,C0y)表示三爪卡盘中心位置C0的位置坐标,(Cix,Ciy)表示三爪卡盘边缘点集合中单个点Ci的位置坐标,m表示三爪卡盘边缘点的总个数;in (C 0x , C 0y ) represents the position coordinates of the center position C 0 of the three-jaw chuck, (C ix , C iy ) represents the position coordinates of a single point C i in the set of edge points of the three-jaw chuck, and m represents the three-jaw chuck the total number of edge points;
S2:加工开始后,获取距离传感器测量的当前距离h1以及三爪卡盘周边的图像;S2: After the processing starts, obtain the current distance h1 measured by the distance sensor and the image around the three-jaw chuck;
S3:对比当前距离h1和距离阈值H0,判断是三爪卡盘的安全距离内是否存在异物,若安全距离内存在异物进入S5,若安全距离内不存在异物进入S4;S3: Comparing the current distance h 1 with the distance threshold H 0 , it is judged whether there is a foreign object within the safety distance of the three-jaw chuck, if there is a foreign object within the safety distance, enter S5, and if there is no foreign object within the safety distance, enter S4;
S4:利用机器视觉算法对图像进行分析,判断是三爪卡盘的安全距离内是否存在属于急停范畴异物,若安全距离内存在属于急停范畴异物进入S5,若安全距离内不存在属于急停范畴异物进入S2;S4: Use the machine vision algorithm to analyze the image, and judge whether there is a foreign object in the emergency stop category within the safety distance of the three-jaw chuck. Stop the foreign body in the category and enter S2;
S5:机床立即报警同时停止工作。S5: The machine tool immediately alarms and stops working.
进一步地,步骤S4包括以下步骤:Further, step S4 includes the following steps:
S41:利用机器视觉算法读取异常参数阈值D0,并对三爪卡盘周边的图像进行预处理;S41: using a machine vision algorithm to read the abnormal parameter threshold D 0 , and preprocessing the images around the three-jaw chuck;
S42:利用当前图像与无异物图像的差分值判断异物有无,若未检测到异物,则执行S2;若检测到异物存在,执行S43;S42: Use the difference value between the current image and the foreign-object-free image to determine whether there is a foreign body, if no foreign body is detected, then execute S2; if the foreign body is detected, execute S43;
S43:利用步骤S1中训练好的机器学习模型识别异物类别,若异物类别不属于急停范畴执行S2,若异物类别属于急停范畴执行S44;S43: Use the machine learning model trained in step S1 to identify the foreign object category, if the foreign object category does not belong to the emergency stop category, execute S2, and if the foreign object category belongs to the emergency stop category, execute S44;
S44:利用Sobel算子或者Canny算子进行图像边缘检测,获取当前图像边缘轮廓形成边缘点集合{Gj},剔除三爪卡盘边缘点集合{Ci}从而计算出异物边缘点集合{Gk},其中{Gj}={Ci}+{Gk};S44: use the Sobel operator or the Canny operator to perform image edge detection, obtain the current image edge contour to form the edge point set {G j }, and remove the three-jaw chuck edge point set {C i } to calculate the foreign object edge point set {G k }, where {G j }={C i }+{G k };
S45:计算三爪卡盘中心位置C0与异物边缘点集合{Gk}之间的距离用于判断三爪卡盘的安全距离内是否存在异物,该值由二者的欧氏距离确定:S45: Calculate the distance between the center position C 0 of the three-jaw chuck and the set of foreign object edge points {G k } to determine whether there is a foreign object within the safety distance of the three-jaw chuck, and this value is determined by the Euclidean distance between the two:
其中(Gkx,Gky)表示异物边缘点集合中单个点Gk的位置坐标,k∈[1,n],n表示异物边缘点的总个数;Where (G kx , G ky ) represents the position coordinates of a single point G k in the foreign object edge point set, k∈[1,n], n represents the total number of foreign object edge points;
S46:通过将欧氏距离Dk与阈值D0参数进行比较,判断三爪卡盘的安全距离内是否存在异物,若Dk<D0则在安全距离内存在异物执行S5,若Dk≥D0且k<n则在安全距离内不存在异物进入S45,若Dk≥D0且k=n则在安全距离内不存在异物进入S2。S46: By comparing the Euclidean distance D k with the threshold D 0 parameter, it is judged whether there is a foreign object within the safety distance of the three-jaw chuck, if D k <D 0 , there is a foreign object within the safety distance and perform S5, if D k ≥ D 0 and k<n, there is no foreign matter entering S45 within the safety distance, and if D k ≥ D 0 and k=n, there is no foreign matter entering S2 within the safety distance.
进一步地,所述步骤S43中所述预处理包括灰度转换、降噪和增强。Further, the preprocessing in step S43 includes grayscale conversion, noise reduction and enhancement.
进一步地,所述步骤S4中所述急停范畴包括头发、手指。Further, the emergency stop category in the step S4 includes hair and fingers.
进一步地,所述机器学习算法为BP神经网络、RBF神经网络、深度学习算法或其他相关算法。Further, the machine learning algorithm is a BP neural network, an RBF neural network, a deep learning algorithm or other related algorithms.
本发明还提供一种基于距离传感器及机器视觉的机床急停装置,包括主控模块、机器视觉分析处理服务器、以及与所述机器视觉分析处理服务器连接的图像采集模块、报警模块、停机模块及距离传感器;The present invention also provides a machine tool emergency stop device based on distance sensors and machine vision, comprising a main control module, a machine vision analysis and processing server, and an image acquisition module, an alarm module, a shutdown module and a machine vision analysis and processing server connected to the machine vision analysis and processing server. distance sensor;
其中,图像采集模块设置在机床三爪卡盘的正对面,用于采集三爪卡盘周边的图像,并发送给机器视觉分析处理服务器;Among them, the image acquisition module is arranged directly opposite the three-jaw chuck of the machine tool, and is used to collect images around the three-jaw chuck and send it to the machine vision analysis and processing server;
报警模块:用于接收到报警命令后发出报警信息;Alarm module: used to send alarm information after receiving the alarm command;
停机模块:用于接收到停机命令后对机床进行停机;Stop module: used to stop the machine tool after receiving the stop command;
距离传感器设置于三爪卡盘的正上方且位于三爪卡盘的两侧,用于测量距离传感器到最近障碍物之间的距离,将结果发送给主控模块;The distance sensor is arranged just above the three-jaw chuck and on both sides of the three-jaw chuck, and is used to measure the distance between the distance sensor and the nearest obstacle, and send the result to the main control module;
所述机器视觉分析处理服务器包括:The machine vision analysis and processing server includes:
预处理模块:用于对采集到的三爪卡盘周边的图像进行灰度转换、降噪、增强处理;Preprocessing module: used to perform grayscale conversion, noise reduction and enhancement processing on the collected images around the three-jaw chuck;
异物检测模块:用于检测三爪卡盘周边是否有异物,将结果发送给主控模块;Foreign body detection module: used to detect whether there is foreign body around the three-jaw chuck, and send the result to the main control module;
类型识别模块:用于对异物类型进行识别,将结果发送给主控模块;Type identification module: used to identify the type of foreign objects and send the result to the main control module;
安全检测模块:通过计算三爪卡盘的中心位置与当前异物边缘点集合的欧氏距离,与异常参数阈值比较,判断三爪卡盘周围的安全距离内是否存在异物,将结果发送给主控模块;所述三爪卡盘的中心位置由机床开始加工前且三爪卡盘周围无异物时边缘点的均值确定,所述当前异物边缘点集合由当前图像边缘点集合剔除三爪卡盘边缘点集合确定;Safety detection module: By calculating the Euclidean distance between the center position of the three-jaw chuck and the current set of foreign object edge points, and comparing it with the abnormal parameter threshold, it can determine whether there is a foreign object within the safety distance around the three-jaw chuck, and send the result to the main control. Module; the center position of the three-jaw chuck is determined by the mean value of the edge points before the machine tool starts processing and when there is no foreign matter around the three-jaw chuck, and the current foreign object edge point set excludes the edge of the three-jaw chuck from the current image edge point set point set is determined;
主控模块:用于连接各模块,并接收异物检测模块、类型识别模块、安全检测模块及距离传感器的输出结果;若检测到距离传感器的当前距离小于距离阈值或者三爪卡盘安全距离内存在属于急停范畴类别的异物,则向报警模块发出报警命令,并向停机模块发出停机命令。Main control module: It is used to connect each module and receive the output results of the foreign object detection module, type identification module, safety detection module and distance sensor; if the current distance of the distance sensor is detected to be less than the distance threshold or the safety distance of the three-jaw chuck exists For foreign objects belonging to the category of emergency stop, an alarm command is issued to the alarm module, and a stop command is issued to the shutdown module.
进一步地,所述异物检测模块通过当前图像与无异物图像的差分值来判断异物有无。Further, the foreign object detection module judges whether there is a foreign object by the difference value between the current image and the image without foreign object.
进一步地,所述类型识别模块通过BP神经网络、RBF神经网络、深度学习算法或其他相关算法形成的机器学习模型识别异物类型,并利用Canny算子或者Sobel算子获取当前图像轮廓的边缘。Further, the type identification module identifies the foreign object type through a machine learning model formed by BP neural network, RBF neural network, deep learning algorithm or other related algorithms, and uses Canny operator or Sobel operator to obtain the edge of the current image contour.
本发明的有益效果在于:The beneficial effects of the present invention are:
利用分布在三爪卡盘两侧的距离传感器检测当前距离,同时结合机器视觉算法分析三爪卡盘安全距离内是否存在头发或者手,若检测到距离传感器的当前距离小于距离阈值或者三爪卡盘安全距离内存在属于急停范畴类别的异物,则向报警模块发出报警命令,并向停机模块发出停机命令,实现了机床的安全生产,同时机器视觉算法能够判断异物是否属于急停范畴从而避免了机床频繁急停,在保证安全生产的前提下提高了生产效率。The distance sensors distributed on both sides of the three-jaw chuck are used to detect the current distance, and the machine vision algorithm is used to analyze whether there is hair or hands within the safe distance of the three-jaw chuck. If there is a foreign object belonging to the category of emergency stop within the safe distance of the disk, an alarm command will be issued to the alarm module, and a stop command will be issued to the shutdown module to realize the safe production of the machine tool. At the same time, the machine vision algorithm can judge whether the foreign object belongs to the category of emergency stop to avoid The frequent emergency stop of the machine tool is avoided, and the production efficiency is improved on the premise of ensuring safe production.
附图说明Description of drawings
图1为本发明一实施例中机床急停装置体的结构结构图;1 is a structural diagram of a machine tool emergency stop device body in an embodiment of the present invention;
图2为本发明一实施例中机床急停方法流程示意图;2 is a schematic flowchart of a method for emergency stop of a machine tool in an embodiment of the present invention;
图3为本发明一实施例中机器视觉算法流程示意图;3 is a schematic flowchart of a machine vision algorithm in an embodiment of the present invention;
图4为本发明一实施例中控制系统结构图;4 is a structural diagram of a control system in an embodiment of the present invention;
附图标识为:1-三爪卡盘、2-距离传感器、3-图像采集模块。The accompanying drawings are identified as: 1-three-jaw chuck, 2-distance sensor, 3-image acquisition module.
具体实施方式Detailed ways
以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。需要说明的是,以下实施例中所提供的图示仅以示意方式说明本发明的基本构想,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。The embodiments of the present invention are described below through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in the following embodiments are only used to illustrate the basic idea of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
其中,附图仅用于示例性说明,表示的仅是示意图,而非实物图,不能理解为对本发明的限制;为了更好地说明本发明的实施例,附图某些部件会有省略、放大或缩小,并不代表实际产品的尺寸;对本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的。Among them, the accompanying drawings are only used for exemplary description, and represent only schematic diagrams, not physical drawings, and should not be construed as limitations of the present invention; in order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings will be omitted, The enlargement or reduction does not represent the size of the actual product; it is understandable to those skilled in the art that some well-known structures and their descriptions in the accompanying drawings may be omitted.
本发明实施例的附图中相同或相似的标号对应相同或相似的部件;在本发明的描述中,需要理解的是,若有术语“上”、“下”、“左”、“右”、“前”、“后”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此附图中描述位置关系的用语仅用于示例性说明,不能理解为对本发明的限制,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。。需要理解的是,本发明并不局限于上述特定实施方式,本领域技术人员可以在权利要求的范围内做出各种变形或修改,这并不影响本发明的实质内容。The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms “upper”, “lower”, “left” and “right” , "front", "rear" and other indicated orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the indicated device or element must be It has a specific orientation, is constructed and operated in a specific orientation, so the terms describing the positional relationship in the accompanying drawings are only used for exemplary illustration, and should not be construed as a limitation of the present invention. situation to understand the specific meaning of the above terms. . It should be understood that the present invention is not limited to the above-mentioned specific embodiments, and those skilled in the art can make various variations or modifications within the scope of the claims, which do not affect the essential content of the present invention.
如图2所示,本发明的实施例提供一种基于距离传感器及机器视觉的机床急停方法,包括以下步骤:As shown in FIG. 2 , an embodiment of the present invention provides a method for emergency stop of a machine tool based on a distance sensor and machine vision, including the following steps:
S1:加工开始前,利用机器学习算法对不同类型的异物图像数据进行训练学习以及获取无异物时三爪卡盘边缘点集合{Ci}从而得到三爪卡盘的中心位置C0;S1: before processing begins, utilize machine learning algorithm to carry out training learning to different types of foreign body image data and obtain the three-jaw chuck edge point set {C i } when there is no foreign body to obtain the center position C 0 of the three-jaw chuck;
其中(C0x,C0y)表示三爪卡盘中心位置C0的位置坐标,(Cix,Ciy)表示三爪卡盘边缘点集合中单个点Ci的位置坐标,m表示三爪卡盘边缘点的总个数;in (C 0x , C 0y ) represents the position coordinates of the center position C 0 of the three-jaw chuck, (C ix , C iy ) represents the position coordinates of a single point C i in the set of edge points of the three-jaw chuck, and m represents the three-jaw chuck the total number of edge points;
S2:加工开始后,获取距离传感器测量的当前距离h1以及三爪卡盘周边的图像;S2: After the processing starts, obtain the current distance h1 measured by the distance sensor and the image around the three-jaw chuck;
S3:对比当前距离h1和距离阈值H0,判断是三爪卡盘的安全距离内是否存在异物,若安全距离内存在异物进入S5,若安全距离内不存在异物进入S4;S3: Comparing the current distance h 1 with the distance threshold H 0 , it is judged whether there is a foreign object within the safety distance of the three-jaw chuck, if there is a foreign object within the safety distance, enter S5, and if there is no foreign object within the safety distance, enter S4;
S4:利用机器视觉算法对图像进行分析,判断是三爪卡盘的安全距离内是否存在属于急停范畴异物,若安全距离内存在属于急停范畴异物进入S5,若安全距离内不存在属于急停范畴异物进入S2;S4: Use the machine vision algorithm to analyze the image, and judge whether there is a foreign object in the emergency stop category within the safety distance of the three-jaw chuck. Stop the foreign body in the category and enter S2;
S5:机床立即报警同时停止工作。S5: The machine tool immediately alarms and stops working.
步骤S1中机器学习算法为BP神经网络、RBF神经网络、深度学习算法或其他相关算法,步骤S1中采用Sobel算子或者Canny算子获取无异物时三爪卡盘边缘点集合{Ci};步骤S4中所述急停范畴包括头发、手。In step S1, the machine learning algorithm is a BP neural network, an RBF neural network, a deep learning algorithm or other related algorithms, and in step S1, a Sobel operator or a Canny operator is used to obtain the set of three-jaw chuck edge points {C i } when there is no foreign matter; The emergency stop category in step S4 includes hair and hands.
如图3所示,步骤S4包括以下步骤:As shown in Figure 3, step S4 includes the following steps:
S41:利用机器视觉算法读取异常参数阈值D0,并对三爪卡盘周边的图像进行预处理;S41: using a machine vision algorithm to read the abnormal parameter threshold D 0 , and preprocessing the images around the three-jaw chuck;
S42:利用当前图像与无异物图像的差分值判断异物有无,若未检测到异物,则执行S2;若检测到异物存在,执行S43;S42: Use the difference value between the current image and the image without foreign matter to determine whether there is a foreign matter, if no foreign matter is detected, execute S2; if the foreign matter is detected, execute S43;
S43:利用步骤S1中训练好的机器学习模型识别异物类别,若异物类别不属于急停范畴执行S2,若异物类别属于急停范畴执行S44;S43: Use the machine learning model trained in step S1 to identify the foreign object category, if the foreign object category does not belong to the emergency stop category, execute S2, and if the foreign object category belongs to the emergency stop category, execute S44;
S44:利用Sobel算子或者Canny算子进行图像边缘检测,获取当前图像边缘轮廓形成边缘点集合{Gj},剔除三爪卡盘边缘点集合{Ci}从而计算出异物边缘点集合{Gk},其中{Gj}={Ci}+{Gk};S44: use the Sobel operator or the Canny operator to perform image edge detection, obtain the current image edge contour to form the edge point set {G j }, and remove the three-jaw chuck edge point set {C i } to calculate the foreign object edge point set {G k }, where {G j }={C i }+{G k };
S45:计算三爪卡盘中心位置C0与异物边缘点集合{Gk}之间的距离用于判断三爪卡盘的安全距离内是否存在异物,该值由二者的欧氏距离确定:S45: Calculate the distance between the center position C 0 of the three-jaw chuck and the set of foreign object edge points {G k } to determine whether there is a foreign object within the safety distance of the three-jaw chuck, and this value is determined by the Euclidean distance between the two:
其中(Gkx,Gky)表示异物边缘点集合中单个点Gk的位置坐标,k∈[1,n],n表示异物边缘点的总个数;Where (G kx , G ky ) represents the position coordinates of a single point G k in the foreign object edge point set, k∈[1,n], n represents the total number of foreign object edge points;
S46:通过将欧氏距离Dk与阈值D0参数进行比较,判断三爪卡盘的安全距离内是否存在异物,若Dk<D0则在安全距离内存在异物执行S5,若Dk≥D0且k<n则在安全距离内不存在异物进入S45,若Dk≥D0且k=n则在安全距离内不存在异物进入S2。S46: By comparing the Euclidean distance D k with the threshold D 0 parameter, it is judged whether there is a foreign object within the safety distance of the three-jaw chuck, if D k <D 0 , there is a foreign object within the safety distance and perform S5, if D k ≥ D 0 and k<n, there is no foreign matter entering S45 within the safety distance, and if D k ≥ D 0 and k=n, there is no foreign matter entering S2 within the safety distance.
步骤S43中所述预处理包括灰度转换、降噪和增强。The preprocessing in step S43 includes grayscale conversion, noise reduction and enhancement.
如图1及图4所述,基于上述机床急停方法,本发明的实施例还提供了一种基于距离传感器及机器视觉的机床急停装置,包括主控模块、机器视觉分析处理服务器、以及与所述机器视觉分析处理服务器连接的图像采集模块3、报警模块、停机模块及距离传感器2;As shown in FIG. 1 and FIG. 4 , based on the above-mentioned machine tool emergency stop method, an embodiment of the present invention further provides a machine tool emergency stop device based on a distance sensor and machine vision, including a main control module, a machine vision analysis and processing server, and an
其中,图像采集模块3设置在机床三爪卡盘1的正对面,用于采集三爪卡盘1周边的图像,并发送给机器视觉分析处理服务器;Wherein, the
报警模块:用于接收到报警命令后发出报警信息;Alarm module: used to send alarm information after receiving the alarm command;
停机模块:用于接收到停机命令后对机床进行停机;Stop module: used to stop the machine tool after receiving the stop command;
距离传感器2设置于三爪卡盘1的正上方且位于三爪卡盘1的两侧,用于测量距离传感器2到最近障碍物之间的距离,将结果发送给主控模块;The
所述机器视觉分析处理服务器包括:The machine vision analysis and processing server includes:
预处理模块:用于对采集到的三爪卡盘1周边的图像进行灰度转换、降噪、增强处理;Preprocessing module: used to perform grayscale conversion, noise reduction and enhancement processing on the collected images around the three-jaw chuck 1;
异物检测模块:用于检测三爪卡盘1周边是否有异物,将结果发送给主控模块;Foreign object detection module: used to detect whether there is foreign object around the three-jaw chuck 1, and send the result to the main control module;
类型识别模块:用于对异物类型进行识别,将结果发送给主控模块;Type identification module: used to identify the type of foreign objects and send the result to the main control module;
安全检测模块:通过计算三爪卡盘1的中心位置与当前异物边缘点集合的欧氏距离,与异常参数阈值比较,判断三爪卡盘1周围的安全距离内是否存在异物,将结果发送给主控模块;所述三爪卡盘1的中心位置由机床开始加工前且三爪卡盘1周围无异物时边缘点的均值确定,所述当前异物边缘点集合由当前图像边缘点集合剔除三爪卡盘1边缘点集合确定;Safety detection module: By calculating the Euclidean distance between the center position of the three-jaw chuck 1 and the current set of foreign object edge points, and comparing it with the abnormal parameter threshold, it determines whether there is a foreign object within the safety distance around the three-jaw chuck 1, and sends the result to Main control module; the center position of the three-jaw chuck 1 is determined by the average value of the edge points before the machine tool starts processing and when there is no foreign matter around the three-jaw chuck 1, and the current foreign object edge point set is eliminated from the current image edge point set. The set of edge points of jaw chuck 1 is determined;
主控模块:用于连接各模块,并接收异物检测模块、类型识别模块、安全检测模块及距离传感器2的输出结果;若检测到距离传感器2的当前距离小于距离阈值或者三爪卡盘1安全距离内存在属于急停范畴类别的异物,则向报警模块发出报警命令,并向停机模块发出停机命令。Main control module: used to connect each module and receive the output results of the foreign object detection module, type identification module, safety detection module and
所述异物检测模块通过当前图像与无异物图像的差分值来判断异物有无。The foreign object detection module judges whether there is a foreign object through the difference value between the current image and the foreign object-free image.
所述类型识别模块通过BP神经网络、RBF神经网络、深度学习算法或其他相关算法形成的机器学习模型识别异物类型,并利用Canny算子或者Sobel算子获取当前图像轮廓的边缘。The type identification module identifies the foreign object type through a machine learning model formed by BP neural network, RBF neural network, deep learning algorithm or other related algorithms, and uses Canny operator or Sobel operator to obtain the edge of the current image contour.
以最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本技术方案的宗旨和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent substitutions are made without departing from the spirit and scope of the technical solution, and they should all be included in the scope of the claims of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010847699.0A CN111975438A (en) | 2020-08-21 | 2020-08-21 | Machine tool emergency stop method and device based on distance sensor and machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010847699.0A CN111975438A (en) | 2020-08-21 | 2020-08-21 | Machine tool emergency stop method and device based on distance sensor and machine vision |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111975438A true CN111975438A (en) | 2020-11-24 |
Family
ID=73443942
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010847699.0A Pending CN111975438A (en) | 2020-08-21 | 2020-08-21 | Machine tool emergency stop method and device based on distance sensor and machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111975438A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111609000A (en) * | 2020-05-18 | 2020-09-01 | 王蕾 | A hidden aluminum alloy furniture fastener |
CN115570447A (en) * | 2022-10-11 | 2023-01-06 | 上海诺倬力机电科技有限公司 | A monitoring method, system, terminal and medium for anti-collision of CNC machine tools |
CN118695362A (en) * | 2024-08-21 | 2024-09-24 | 中科航迈数控软件(深圳)有限公司 | Positioning method, device and storage medium of handwheel pulse generator |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107088971A (en) * | 2016-02-17 | 2017-08-25 | 株式会社迪思科 | Processing unit (plant) |
CN206578557U (en) * | 2017-01-18 | 2017-10-24 | 浙江工业职业技术学院 | A kind of novel lathe with visual protective apparatus |
CN108229548A (en) * | 2017-12-27 | 2018-06-29 | 华为技术有限公司 | A kind of object detecting method and device |
CN110728655A (en) * | 2019-09-06 | 2020-01-24 | 重庆东渝中能实业有限公司 | Machine vision-based numerical control machine tool workpiece abnormity detection method and device |
KR20200064947A (en) * | 2018-11-29 | 2020-06-08 | (주)코어센스 | Apparatus for tracking position based optical position tracking system and method thereof |
-
2020
- 2020-08-21 CN CN202010847699.0A patent/CN111975438A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107088971A (en) * | 2016-02-17 | 2017-08-25 | 株式会社迪思科 | Processing unit (plant) |
CN206578557U (en) * | 2017-01-18 | 2017-10-24 | 浙江工业职业技术学院 | A kind of novel lathe with visual protective apparatus |
CN108229548A (en) * | 2017-12-27 | 2018-06-29 | 华为技术有限公司 | A kind of object detecting method and device |
KR20200064947A (en) * | 2018-11-29 | 2020-06-08 | (주)코어센스 | Apparatus for tracking position based optical position tracking system and method thereof |
CN110728655A (en) * | 2019-09-06 | 2020-01-24 | 重庆东渝中能实业有限公司 | Machine vision-based numerical control machine tool workpiece abnormity detection method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111609000A (en) * | 2020-05-18 | 2020-09-01 | 王蕾 | A hidden aluminum alloy furniture fastener |
CN115570447A (en) * | 2022-10-11 | 2023-01-06 | 上海诺倬力机电科技有限公司 | A monitoring method, system, terminal and medium for anti-collision of CNC machine tools |
CN118695362A (en) * | 2024-08-21 | 2024-09-24 | 中科航迈数控软件(深圳)有限公司 | Positioning method, device and storage medium of handwheel pulse generator |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111975438A (en) | Machine tool emergency stop method and device based on distance sensor and machine vision | |
CN105354987B (en) | Vehicle-mounted type fatigue driving detection and identification authentication system and its detection method | |
CN104637246B (en) | Driver multi-behavior early warning system and danger evaluation method | |
CN109460699A (en) | A kind of pilot harness's wearing recognition methods based on deep learning | |
CN103236181B (en) | Traffic signal lamp state monitoring system and method based on machine vision | |
CN108052900A (en) | A kind of method by monitor video automatic decision dressing specification | |
CN102982316A (en) | Driver abnormal driving behavior recognition device and method thereof | |
CN110264653B (en) | Head-mounted identity recognition and border crossing early warning system based on Internet of things | |
CN107643709A (en) | A kind of ultrahigh speed permagnetic synchronous motor monitoring system based on multi-sensor information fusion | |
CN109353923B (en) | Elevator layer door lock short circuit detects and positioner | |
CN110231529A (en) | A kind of control cabinet intelligent Fault Diagnose Systems and method for diagnosing faults | |
CN105024595B (en) | A kind of brshless DC motor failure monitoring method and device | |
CN110103816A (en) | A kind of driving condition detection method | |
CN117719382A (en) | A charging safety analysis model construction and automated charging pile monitoring system | |
CN115520741A (en) | Elevator operation monitoring and early warning method, system and storage medium based on neural network | |
CN109335908A (en) | A kind of elevator landing door lock short circuit detection and positioning method | |
CN111531581B (en) | Industrial robot fault action detection method and system based on vision | |
CN210100021U (en) | Automatic obstacle-removing robot system for transformer substation | |
CN113486743A (en) | Fatigue driving identification method and device | |
JP6646416B2 (en) | Rotating machine short circuit diagnosis apparatus and rotating machine short circuit diagnosis method | |
CN112000094A (en) | A system and method for online identification and positioning of high-voltage transmission line fittings combined with single and binocular | |
CN111055890B (en) | Intelligent detection method and detection system for railway vehicle anti-slip | |
CN118470636A (en) | Building site safety wearing detection method and system based on edge calculation | |
CN111731979A (en) | A computer vision-based fall recognition system for escalator passengers | |
CN117650620A (en) | Safety early warning system and device for building block type insulating platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201124 |
|
RJ01 | Rejection of invention patent application after publication |