A method for collecting and processing tool vibration signals based on edge computing and its implementation system
By adopting tool vibration signal acquisition and processing methods based on edge calculation in machine tool processing, the hysteresis problem of tool vibration signal acquisition and processing in the prior art is solved, real-time and accurate wear prediction is achieved, and production efficiency and quality are improved.
Patent Information
- Application Number
- CN202111583952.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-12-22
AI Technical Summary
The prior art is difficult to achieve real-time and accurate tool vibration signal acquisition and processing in machine tool processing, resulting in tool wear prediction lag and affecting production efficiency and quality.
Using the tool vibration signal acquisition and processing method based on edge computing, data is collected through sensors, and edge computing devices read, store and preprocess it, eliminate unnecessary data, reduce transmission delay, and send the processed data to the cloud for storage and analysis.
Real-time detection of tool wear is achieved, data processing delays are reduced, data utilization and production quality are improved, and cost losses caused by workpiece processing failures are reduced.
Smart Images

Figure CN114239664B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for collecting and processing tool vibration signals based on edge computing and an implementation system thereof, belonging to the technical fields of data acquisition and processing, and predictive maintenance. Background Art
[0002] In the machining task of a machine tool, the remaining life of a tool will affect the machining result of a workpiece, and the vibration signal of the tool is an important information for effectively predicting tool wear and breakage. In the actual machining process, the loss caused by workpiece damage is much larger than other losses. Therefore, effectively collecting and processing tool vibration data and performing predictive analysis in real time can improve the utilization rate of the tool, and prompt the operator to change the tool before the tool breaks and avoid workpiece damage in advance.
[0003] The tool vibration signal needs to be collected in real time through a three-dimensional vibration sensor. At present, most of the means for tool detection in machine tools and the data detection methods of deployed vibration sensors have great limitations, as follows:
[0004] First, for the manual detection method of tool durability, it often relies on the experience of the worker master, and predicts tool wear by estimating the machining time and the sound during machining; or directly uses a microscope to observe the tool breakage situation. When it is observed that the tool thickness is lower than the threshold or multiple cutting edges are worn and broken, it can be confirmed that the tool is about to be damaged or has been damaged. The limitation of the empirical method is that tool detection depends on the manual experience of the worker, and it is not an accurate prediction based on measured data, which cannot meet the production requirements of automation and intelligence; the microscope detection method requires the tool to be removed for detection. When the tool is approaching wear, it needs to be disassembled and detected multiple times, which will seriously affect the production efficiency and increase the production cost.
[0005] Second, the sensor detection currently used in factories, although the detection parameters can be set through a web interface, is limited by the memory size of the internal memory of the sensor, and can only store a large amount of data in the sensor in binary format; and only after each machining plan is completed, the binary file of the vibration signal can be extracted from the sensor, and after being converted into other file formats, the subsequent analysis can be continued. Such detection methods cannot use data in real time, have a large lag in predicting tool wear and breakage, cannot generate the vibration data required by the neural network in real time, and cannot avoid the cost loss caused by workpiece machining failure in time.
[0006] Third, in a production system without a deployed edge computing architecture, there is no data preprocessing means before a large amount of data is uploaded. For production scenarios under various industrial demands, factories currently choose to upload and process a large amount of raw data, which will increase the processing time and cause a great burden on the industrial network.
[0007] Fourth, the single sensor acquisition lacks means of distributed storage and calculation of data. The cloud-edge-end collaborative system improves the scalability and replaceability of the system structure through a multi-layer structure.
[0008] The amplitude of the vibration signal generated by the machine tool tool during the tool entry and exit periods is too large, while the vibration signal generated during the tool idle period is almost zero. These data have little reference significance for predictive maintenance. Most of the tool vibration signal acquisitions only read the content based on sensor data and contain a lot of unnecessary data information. At the same time, due to the high sampling frequency of the tool vibration sensor for vibration signals, a large amount of data is generated in a short time. Limited equipment processing capacity is prone to data accumulation and calculation delay problems. Therefore, it is necessary to preprocess the acquired data to filter and crop the effective part of the vibration signal. Such processing can not only ensure the reliability of the data, but also reduce the occupancy of the transmission bandwidth between the sensor and the prediction computer, reduce the time delay, and improve the timeliness.
[0009] Most of the existing machine tool processing working modes do not deploy the cloud-edge architecture and still need to be improved in terms of prediction accuracy, problem analysis, and overall optimization. Edge computing has high requirements for the adaptability of industrial scenarios, and indicators such as processing tasks and time delay requirements need to be comprehensively considered. Therefore, cooperating with edge devices to build a cloud-edge-end collaborative working mode that takes into account end acquisition, edge preprocessing and inference, and cloud training and model distribution can effectively read and utilize data, use different amounts of data at different positions, reduce the pressure of data upload, reduce the time delay, and improve data utilization rate, production quality, and production efficiency. Summary of the Invention
[0010] In view of the deficiencies of the prior art, the present invention provides a method for collecting and processing tool vibration signals based on edge computing, which realizes the reading, saving, and preprocessing of three-dimensional tool vibration signals, can detect the wear condition of the tool in a timely manner, and can reduce the time delay and improve the utilization rate of the collected data, production quality, and production efficiency.
[0011] The present invention also provides an implementation system for the above method for collecting and processing tool vibration signals based on edge computing.
[0012] The technical solution of the present invention is as follows:
[0013] A method for collecting and processing tool vibration signals based on edge computing includes the following steps:
[0014] S1. The sensor collects tool vibration signal data;
[0015] S2. The edge computing device reads the tool vibration signal data;
[0016] S3. The edge computing device stores the tool vibration data;
[0017] S4. The edge computing device preprocesses the tool vibration data and then sends the processed data to the cloud for storage. At the same time, the edge computing device packages the unprocessed tool vibration data into JSON format and sends it to the cloud web page for real-time display.
[0018] Preferably according to the present invention, in step S2, the methods of reading the tool vibration signal data include the following two:
[0019] (1) Directly read the original data collected by the sensor;
[0020] (2) After performing secondary sampling on the original data collected by the sensor, then read it. Specifically:
[0021] The edge computing device performs secondary sampling on the binary file stored in the sensor, that is, reads the binary file at equal entry intervals and extracts it into the edge computing device; when the entry interval of the secondary sampling is 0, it is equivalent to completely reading the data collected by the sensor.
[0022] The sampled data values of the three channels of the vibration sensor are called primary sampling; secondary sampling can ensure that while not affecting the integrity of the sensor's backup of the original data, according to the time sparsity requirements of the required data, part of the data is extracted for transmission, reducing the data transmission volume from the edge to the cloud and reducing the latency. At the same time, the secondary sampling interval needs to adapt to the reading speed of the file and the network transmission speed to reduce the delay in writing to the CSV file.
[0023] Preferably according to the present invention, in step S3, the edge computing device stores the tool vibration data by entry, that is, divides the data into several CSV format files according to the number of data entries for storage. This storage method includes mode a and mode b;
[0024] The working process of mode a includes:
[0025] 1) Read the tool vibration data collected by the sensor and write it into the numpy_data array;
[0026] 2) Through format conversion, convert the one-dimensional array into a two-dimensional array with N rows and three columns to obtain the channel readings of the vibration sensor at the X-axis, Y-axis, and Z-axis during each sampling. During the machining process, the Z-axis value can best reflect the vibration signal characteristics, so it is used for subsequent judgment;
[0027] 3) Set a loop flag variable flag and initialize the value of flag to 0;
[0028] 4) When the channel reading of the Z-axis is greater than the set threshold V0, record the current time. Use the folder, current time, and file serial number as the file save path. For example, "Save the data of the fifth acquisition obtained at 10:55:23 on December 8th in the CSV-data folder, and the file name is '12-08-10-55-23-5'. Generate an empty CSV format file and set the flag value to 1;
[0029] 5) When the flag value is 1, open the CSV format file under the file save path generated in step 4) and write the data line by line. At the same time, detect the number of data entries already stored in the CSV format file. When the number of data entries reaches the set value N0, set the flag value to 0 to complete the writing of a CSV file with a fixed number of data entries;
[0030] 6) Repeat steps 1)-5) to enter the next loop until the reading of the tool vibration data ends;
[0031] The file generation condition of mode a can effectively ensure the storage of the file when the tool first touches the workpiece. The key to writing the file is that the data read in each loop will be written once, and the file update frequency is relatively high. Each file contains the latest sensor data. If the total time delay for writing a fixed amount of data is determined, this mode will average the time delay of writing the data into each process of writing the file, ensuring the real-time nature of the file to the greatest extent.
[0032] The working process of mode b includes:
[0033] 1) Read the tool vibration data collected by the sensor and write it into the numpy_data array;
[0034] 2) Through format conversion, convert the one-dimensional array into a two-dimensional array with N rows and three columns to obtain the channel readings of the vibration sensor on the X-axis, Y-axis, and Z-axis for each sampling. During the machining process, the Z-axis value can best reflect the vibration signal characteristics, so it is used for subsequent judgment;
[0035] 3) Set a loop flag variable flag and initialize the flag value to 0;
[0036] 4) When the channel reading of the Z-axis is greater than the set threshold V0, record the current time. Use the folder, current time, and file serial number as the file save path, generate an empty CSV format file, and set the flag value to 1;
[0037] 5) When the flag value is 1, the data collected each time is added to the empty array data_buffer. When the number of data entries in this array is less than the set value, data is added in a loop; when the number of elements in the first dimension of the array data_buffer reaches the set value N1, the number of elements in the first dimension of the array data_buffer corresponds to the number of collected data items. All the data in data_buffer is written into a CSV format file at one time, data_buffer is cleared and the flag value is set to 0, completing a write of a fixed number of data items.
[0038] 6) Repeat steps 1)-5), enter the next loop until the reading of the tool vibration data ends.
[0039] The difference between mode b and mode a is that in mode b, the data read each time is added to the array variable data_buffer. When the first dimension of this array variable reaches the set value N1, the data in the array is written into the CSV file in sequence, and then the content of the array is cleared. Mode b can save the iteration time of the program by writing data into variables. When applied during the period of collecting data to prepare for the training set, it can reduce the total time of data collection. Mode b stores data according to the number of data items, so that the number of data items in each CSV file is fixed, and thus the file size is also approximately the same. At the same time, N0 of each CSV file can be adjusted to generate files of the required size, which can adapt to the file sending and storage methods. Storing by item can keep the number of data items in the file consistent, ensure the unity of file size, and facilitate retrieval and accurate annotation according to item correspondence.
[0040] According to the preference of the present invention, in step S3, the edge computing device stores the tool vibration data according to time, that is, stores data according to the set time. The working process includes:
[0041] 1) Set the time flag bit time_flag and set the initial value of time_flag to 0;
[0042] Set the timing thread. When M0 minutes have passed, set time_flag to 1;
[0043] 2) When it is detected that the input Z-axis channel reading is greater than the set threshold V0, record the current time and generate a file save path, such as "Save the data collected at 10:50:20 on December 8th, and the file name is "12-08-10-50-20"; then set the flag value to 1.
[0044] 3) When the timing thread detects that flag = 1 and time_flag = 0, it triggers the start of timing;
[0045] 4) When the flag value is 1, data is written normally. When the timing time reaches the set time M0, the time_flag is set to 1, time is set to 0, and the thread ends; wait for the next creation of a new thread to end.
[0046] Stored by time. According to the actual needs of the factory, it can be set to store according to the processing duration (for example, if it is known that the single processing duration of a certain type of tool for a workpiece is 3 minutes, a file with a single storage of 3 minutes can be set). This method generates files according to the actual processing situation, writes all the data of the single processing duration into the same CSV file. When selecting the training samples, the file generated by the tool breakage during that processing can be directly selected and marked for use.
[0047] According to the preference of the present invention, in step S4, the edge computing device performs filtering preprocessing on the tool vibration data, and the filtering requirements are as follows:
[0048] (1) The amplitude M(t) of the vibration signal at a certain moment is lower than the set value A0;
[0049] (2) For a data queue with the sampling signal as the center of the sliding window and a length of N0, calculate its sliding average value C0, and C0 is less than A1.
[0050] The data segments that simultaneously meet the above two conditions are truncated, and the remaining parts are spliced to achieve filtering.
[0051] When the edge computing device communicates with the cloud, due to the large amount of original data and long transmission delay, a filtering algorithm is first deployed on the edge side to filter out the data of the tool idling in the original tool vibration data, and only extract the sensing data during the actual processing of the tool, compress it and send it to the cloud for storage. Because the tool is in an idling state before the tool enters and after it exits, the acceleration of the vibration signal is very small and close to 0. The filtering algorithm, as a means of data preprocessing, aims to cut off the part where the acceleration value is close to 0 during the idling period before the tool enters and after it exits, and send the remaining valid data segment to the cloud for inference and training, reducing the transmission volume and transmission delay from the edge to the cloud. The preprocessing filtering algorithm is set to filter according to the magnitude of the acceleration value.
[0052] According to the preference of the present invention, in step S1, the acceleration value of the tool is used as the data characterizing the tool vibration signal, with the unit of m / s 2 .
[0053] Due to the large sensor sampling frequency and limited storage capacity of the sensor itself, the tool vibration signal data collected is stored in the sensor in the form of a binary file. For a sensor device with limited memory, the binary format data can speed up the reading and writing speed and save storage space.
[0054] Preferably according to the present invention, in step S4, when the edge computing device communicates with the cloud, header information of a corresponding length is added before the content of the data to be sent, and the current sensor status and tool model are added (for example, ST2-001K indicates that the sensor is in the acquisition state and the machining tool is of type 1). The encoding method and content of the header information are not limited to this.
[0055] The implementation system of the above real-time vibration signal acquisition and processing method based on edge computing includes:
[0056] A data acquisition module for acquiring tool vibration signal data;
[0057] A data reading module for reading tool vibration signal data;
[0058] A data storage module for storing tool vibration data;
[0059] A data preprocessing module for preprocessing the tool vibration data and then sending the processed data to the cloud for storage; at the same time, the edge computing device sends the unprocessed tool vibration data to the cloud for real-time display.
[0060] The beneficial effects of the present invention are as follows:
[0061] 1. The present invention adopts a method of combining multiple data reading methods. The data reading methods are divided into full reading and secondary sampling reading. Sampling can be performed according to actual needs, which can fully adapt to equipment performance and network requirements under the condition of limited funds. Full reading is the reading method under normal circumstances. The collected data is comprehensive and complete, and it has good timeliness for training the model, and the feature extraction is more obvious. Under the secondary sampling method, the data reading speed is faster and the data volume is smaller. Secondary sampling is to set an algorithm artificially for sampling, and various algorithms can be used, such as: equal interval sampling method, head and tail data sampling method, etc. (but not limited to this). On the premise of retaining the basic features of the data, the time density of the data is reduced, reducing the subsequent file writing time and the delay in sending to the cloud, meeting the timeliness requirements. In addition, models corresponding to different sampling frequencies are trained in the cloud, and predictive maintenance analysis of the tool is performed on the data obtained by different secondary sampling methods, which can adapt to changes in the network environment.
[0062] 2. The present invention combines multiple data storage methods. The data storage methods are divided into the method of storing by item and the method of storing by time. Storing by item can keep the number of data items in the file consistent, ensure the uniformity of the file size, and facilitate retrieval and accurate annotation corresponding to each item. Storing by time, according to the actual requirements of the factory, it can be set to store according to the processing duration (for example, if the single processing duration of a certain type of tool on a workpiece is known to be 3 minutes, a file with a single storage of 3 minutes can be set). This method generates files according to the actual processing situation and writes all the data of the single processing duration into the same CSV file. When selecting the samples for training, the file generated by the processing at the time of tool breakage can be directly selected for annotation and then used. In addition, the obtained data will be used for data comparison to analyze the change of the vibration signal of the tool during each processing. Actual test results: a sampling frequency of 10240 Hz, a cyclic reading frequency of 10000 times per second, it takes 3 hours and 36 minutes, and a total of 132833279 three-channel data are collected in real time without any lag phenomenon.
[0063] 3. In terms of data preprocessing, the data preprocessing clips the idle signals before tool entry and after tool exit, reduces the amount of data and then sends it to the cloud, effectively solving the data transmission problem caused by data redundancy under communication condition limitations. The filtering data preprocessing method is adopted to filter out the idle signals before tool entry and after tool exit, and at the same time ensure that the idle signals that appear briefly during the tool processing are not filtered out, maintaining the integrity of the effective part of the data.
[0064] 4. This application applies the cloud-edge-end architecture in the field of machine tool processing, overcoming the problem that only using end collection cannot solve a large amount of data Storage problems, nor can it solve the computing power problem required for data analysis; and the problem that only using end-edge cooperation, the data is scattered in each edge device and cannot be aggregated to build an effective database. The cloud-edge-end architecture provided by this application can provide the highest-level computing power, while ensuring data backup storage and model training. Mobile devices can access the cloud interface through the domain name to achieve multi-node monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a schematic diagram of the basic principle of secondary sampling provided by the present invention.
[0066] Figure 2 It is an architecture diagram of a cloud-edge-end system provided by the present invention.
[0067] Figure 3 It is a data flow diagram of mode a of a storage scheme provided in Embodiment 2 of the present invention.
[0068] Figure 4 It is a data flow diagram of mode b of a storage scheme provided in Embodiment 2 of the present invention. Specific Embodiments
[0069] The present invention will be further described below in conjunction with embodiments and the accompanying drawings of the specification, but not limited thereto.
[0070] Embodiment 1
[0071] A method for collecting and processing tool vibration signals based on edge computing. This method is based on a cloud-edge-end system, and the framework structure is as Figure 2 shown, including the following steps:
[0072] S1. The sensor collects tool vibration signal data;
[0073] S2. The edge computing device reads the tool vibration signal data;
[0074] S3. The edge computing device stores the tool vibration data;
[0075] S4. The edge computing device preprocesses the tool vibration data, and then sends the processed data to the cloud for storage; at the same time, the edge computing device packages the unprocessed tool vibration data into JSON format and sends it to the cloud web page for real-time display.
[0076] The computing device layout of the cloud-edge-end is suitable for the hierarchical computing architecture of the industrial Internet. It meets the requirements of industrial application control, data fusion, data analysis, data storage, model training, etc.
[0077] By accessing the private cloud of the factory, the cloud-deployed web page is used as an interface for real-time monitoring, data management, and analysis. It can not only ensure that data does not leave the factory, but also realize multi-terminal real-time monitoring through permission management, achieving convenient expansion and flexible deployment of management. The storage space of the cloud supports long-term storage of a large amount of data; the private cloud can ensure that data does not leave the factory area, ensuring data privacy. After being processed by the edge device, the cloud can store the effective part of the data and display the most intuitive dimension of the data according to requirements.
[0078] The edge computing device will be integrated with the traditional automation ISA-95 pyramid architecture in the industrial Internet, and the computing power of the edge device will be incorporated into the control system. At the same time, the edge computing device can effectively process multi-type and multi-source data, and further perform data fusion, caching, and processing work. The edge device can continuously adjust the algorithm or code by learning and upgrading the algorithm, process data at a place close to the data source, achieve low latency, reduce the possibility of data loss and transmission interruption, and improve the reliability of data analysis.
[0079] The terminal device generally uses an embedded device. The key lies in aggregating the massive amounts generated by sensor devices with different protocols and interfaces, and achieving the most basic data perception and collection with high reliability and low energy consumption.
[0080] Example 2
[0081] A method for collecting and processing tool vibration signals based on edge computing, which is different from the method for collecting and processing tool vibration signals based on edge computing provided in Example 1 in that:
[0082] In step S1, the acceleration value of the tool is used as the data characterizing the tool vibration signal, and the unit is m / s 2 .
[0083] Due to the large sampling frequency of the sensor and the limited storage capacity of the sensor itself, the collected tool vibration signal data is stored in the sensor in the form of a binary file. For a sensor device with limited memory, the binary format data can speed up the reading and writing speed and save storage space.
[0084] In step S2, the methods for reading the tool vibration signal data include the following two:
[0085] (1) Directly read the original data collected by the sensor;
[0086] (2) After performing secondary sampling on the original data collected by the sensor, then read it. The principle of secondary sampling is as Figure 1 shown, specifically:
[0087] The edge computing device performs secondary sampling on the binary file stored in the sensor, that is, reads the binary file at equal entry intervals and extracts it into the edge computing device; when the entry interval of secondary sampling is 0, it is equivalent to completely reading the data collected by the sensor.
[0088] The sampled data values of the three channels of the vibration sensor are called primary sampling; secondary sampling can ensure that while not affecting the integrity of the original data backed up by the sensor, according to the time sparsity requirements of the required data, extract part of the data for transmission, reduce the data transmission volume from the edge to the side, and reduce the delay. At the same time, the secondary sampling interval needs to adapt to the reading speed of the file and the network transmission speed to reduce the delay of writing to the CSV file.
[0089] In step S3, the edge computing device stores the tool vibration data in the form of storing by entry, that is, divides the data into several CSV format files according to the number of data entries for storage, specifically including mode a and mode b;
[0090] As Figure 3 shown, the working process of mode a includes:
[0091] 1) Read the tool vibration data collected by the sensor and write it into the numpy_data array;
[0092] 2) Convert the one-dimensional array into a two-dimensional array with N rows and three columns by converting the format, obtaining the channel readings of the vibration sensor at the X-axis, Y-axis, and Z-axis for each sampling. During the machining process, the Z-axis value can best reflect the characteristics of the vibration signal, so it is used for subsequent judgment;
[0093] 3) Set a loop flag variable flag and initialize the value of flag to 0;
[0094] 4) When the channel reading of the Z-axis is greater than the set threshold V0, record the current time, generate an empty CSV format file with the folder, current time, and file serial number as the file save path, and set the value of flag to 1;
[0095] 5) When the value of flag is 1, open the CSV format file under the file save path generated in step 4) and write the data line by line; at the same time, detect the number of data already stored in the CSV format file. When the number of data reaches the set value N0, set the value of flag to 0 to complete the writing of a CSV file with a fixed number of data;
[0096] 6) Repeat steps 1)-5), enter the next loop until the reading of the tool vibration data ends;
[0097] The file generation condition of mode a can effectively ensure the storage of the file when the tool first touches the workpiece. The key to writing the file is that the data read in each loop will be written once, and the update frequency of the file is relatively high. Each file contains the latest sensor data. If the total time delay for writing a fixed amount of data is determined, this mode will average the time delay of writing the data into each process of writing the file, ensuring the real-time nature of the file to the greatest extent.
[0098] As Figure 4 shown, the working process of mode b includes:
[0099] 1) Read the tool vibration data collected by the sensor and write it into the numpy_data array;
[0100] 2) Convert the one-dimensional array into a two-dimensional array with N rows and three columns by converting the format, obtaining the channel readings of the vibration sensor at the X-axis, Y-axis, and Z-axis for each sampling. During the machining process, the Z-axis value can best reflect the characteristics of the vibration signal, so it is used for subsequent judgment;
[0101] 3) Set a loop flag variable flag and initialize the value of flag to 0;
[0102] 4) When the channel reading of the Z-axis is greater than the set threshold V0, record the current time, generate an empty CSV format file with the folder, current time, and file serial number as the file save path, and set the value of flag to 1;
[0103] 5) When the flag value is 1, the data collected each time is added to the empty array data_buffer. When the number of data entries in this array is less than the set value, the data is added in a loop; when the number of elements in the first dimension of the array data_buffer reaches the set value N1, the number of elements in the first dimension of the array data_buffer corresponds to the number of collected data items. All the data in data_buffer is written into a CSV format file at one time, data_buffer is cleared and the flag value is set to 0, completing the writing of a fixed number of data items.
[0104] 6) Repeat steps 1)-5), enter the next loop until the reading of the tool vibration data ends.
[0105] The difference between mode b and mode a is that in mode b, the data read each time is added to the array variable data_buffer. When the first dimension of this array variable reaches the set value N1, the data in the array is written into the CSV file in sequence, and then the content of the array is cleared. Mode b can save the iteration time of the program by writing data into variables. When applied during the period of collecting data to prepare for the training set, it can reduce the total time of data collection. Mode b stores according to the number of data entries, so that the number of data entries in each CSV file is fixed, and thus the file size is approximately the same. At the same time, N0 of each CSV file can be adjusted to generate a file of the required size, which can adapt to the file sending and storage method. Storing by entry can keep the number of data entries in the file consistent, ensure the unity of the file size, and facilitate retrieval and accurate annotation according to the entry correspondence.
[0106] In step S4, the edge computing device performs filtering preprocessing on the tool vibration data, and the filtering requirements are as follows:
[0107] (1) The amplitude M(t) of the vibration signal at a certain moment is lower than the set value A0;
[0108] (2) For a data queue with the sampling signal as the center of the sliding window and a length of N0, calculate its sliding average value C0, and C0 is less than A1.
[0109] The data segments that simultaneously meet the above two conditions are truncated, and the remaining parts are spliced to achieve filtering.
[0110] The currently commonly used sensor filtering algorithms include limit filtering, average filtering, median filtering, etc. Limit filtering will replace the real data exceeding the set threshold with the set threshold to filter out the excessively large values in the real data, so as to reduce the maximum difference of the output data after filtering; average filtering takes a certain length of original data, accumulates and then takes the average to obtain relatively stable output data, which can be used to filter out high-frequency noise in the original data; median filtering calculates the median of a set of data and outputs it as the filtering value. This filtering method can also achieve the effect of limit filtering and reduce the maximum difference of the output data. However, median filtering will change the original value of the data. However, limit filtering will affect the authenticity of the effective part of the data, and average filtering and median filtering cannot extract and cut off the part where the tool idles.
[0111] The commonly used smoothing filtering for vibration signals is also not applicable because although there is noise in the production site, for the same production environment, deep learning can adapt to noise interference, while smoothing filtering will damage the data authenticity, so it is not adopted.
[0112] Combined with the actual requirements, starting from the perspective of protecting data authenticity, the present invention integrates the ideas of sliding filtering and mean filtering, and cuts off invalid data at the center point of the data segment with low amplitude.
[0113] In step S4, when the edge computing device communicates with the cloud, corresponding length of header information is added before the content of the sent data, and the current sensor status and tool model are added. For example, ST2-001K means that the sensor is in the acquisition state and the processing tool is the tool of type 1. The encoding method and content of the header information are not limited to this.
[0114] Embodiment 3
[0115] A method for collecting and processing tool vibration signals based on edge computing is different from the method for collecting and processing tool vibration signals based on edge computing provided in Embodiment 2 in that:
[0116] In step S3, the edge computing device stores the tool vibration data according to time, that is, stores the data according to the set time timing. The working process includes:
[0117] 1) Set the time flag bit time_flag and set the initial value of time_flag to 0;
[0118] Set the timing thread. When the timing reaches M0 minutes, set time_flag to 1;
[0119] 2) When it is detected that the input Z-axis channel reading is greater than the set threshold V0, record the current time and generate a file save path, such as "Save the data collected at 10:50:20 on December 8th, and the file name is "12-08-10-50-20"; then set the flag value to 1;
[0120] 3) When the timing thread detects that flag = 1 and time_flag = 0, it triggers the start of timing;
[0121] 4) When the flag value is 1, data is written normally. When the timing time reaches the set time M0, time_flag is set to 1, time is set to 0, and the thread ends; wait for the next creation of a new thread to end.
[0122] Store by time. According to the actual needs of the factory, it can be set to store according to the processing duration (for example, if it is known that the single processing duration of a certain type of tool for a workpiece is 3 minutes, a file with a single storage of 3 minutes can be set). This method generates files according to the actual processing situation and writes all the data of the single processing duration into the same CSV file. When selecting the samples for training, the file generated by the tool breakage during that processing can be directly selected and labeled for use.
[0123] Example 4
[0124] An implementation system for a method of collecting and processing tool vibration signals based on edge computing provided by any one of Examples 1-3 includes:
[0125] A data acquisition module for acquiring tool vibration signal data;
[0126] A data reading module for reading tool vibration signal data;
[0127] A data storage module for storing tool vibration data;
[0128] A data preprocessing module for preprocessing tool vibration data and then sending the processed data to the cloud for storage; at the same time, the edge computing device sends the unprocessed tool vibration data to the cloud for real-time display.
[0129] Comparative Example 1
[0130] In the prior art, there are usually two methods for tool fault diagnosis: 1. Manual experience method. There will be obvious changes in the sound before and after the tool breaks. Experienced workers pay close attention to the tool during processing. Through the sound, the tool life can be estimated. This method highly depends on the experience of workers and has certain subjectivity. It may lead to the situation that the tool is not fully utilized due to premature judgment or the workpiece is damaged due to lagged judgment, and intelligent processing detection cannot be achieved; 2. Wear curve method. After each processing is completed, the tool is removed, and a special microscope is used to observe the wear condition of the tool, and a wear curve is plotted to estimate the tool life.
[0131] Currently, the vibration signal acquisition, reading and storage scheme is to directly collect using a vibration sensor, read all the collected data and input it into the receiving device for calculation and analysis. In the cloud-edge architecture, the original data will be all uploaded to the cloud for storage and processing.
[0132] However, the present invention adopts an intelligent sensor with a Raspberry Pi embedded. While the edge side locally stores the complete original data, it uses a filtering algorithm to filter the original data and sends it to the cloud for AI processing. The cloud only needs to store all the data required for the training set, and the complete data is stored at the edge device.
Claims
1. A method for collecting and processing tool vibration signals based on edge computing, characterized in that, It includes the following steps: S1. The sensor collects the tool vibration signal data; S2. The edge computing device reads the tool vibration signal data. The ways of reading the tool vibration signal data include the following two: (1) Directly read the original data collected by the sensor; (2) After performing secondary sampling on the original data collected by the sensor, then read it. Specifically: The edge computing device performs secondary sampling on the binary file stored in the sensor, that is, reads the binary file at equal entry intervals and extracts it into the edge computing device; when the entry interval of secondary sampling is 0, it is equivalent to completely reading the data collected by the sensor; S3. The edge computing device stores the tool vibration data by entry and by time. Storing by entry includes mode a and mode b; S4. The edge computing device performs filtering preprocessing on the tool vibration data. The filtering requirements are as follows: (1) The amplitude M(t) of the vibration signal at a certain moment is lower than the set value A0; (2) For a data queue with the sampled signal as the center of the sliding window and a length of N0, calculate its sliding average value C0, and C0 is less than A1; The data segments that simultaneously meet the above two conditions are truncated, and the remaining parts are spliced to achieve filtering; Then the processed data is sent to the cloud for storage; at the same time, the edge computing device sends the un-preprocessed tool vibration data to the cloud for real-time display.
2. The method for collecting and processing tool vibration signals based on edge computing according to claim 1, characterized in that, In step S3, the working process of mode a includes: 1) Read the tool vibration data collected by the sensor and write it into the numpy_data array; 2) Through format conversion, convert the one-dimensional array into a two-dimensional array with N rows and three columns to obtain the channel readings of the vibration sensor on the X-axis, Y-axis, and Z-axis for each sampling; 3) Set a loop flag variable flag and initialize the value of flag to 0; 4) When the channel reading of the Z-axis is greater than the set threshold V0, record the current time, generate an empty CSV format file with the folder, current time, and file serial number as the file save path, and set the value of flag to 1; 5) When the value of flag is 1, open the CSV format file under the file save path generated in step 4) and write the data line by line; at the same time, detect the number of data entries already stored in the CSV format file. When the number of data entries reaches the set value N0, set the value of flag to 0 to complete the writing of a CSV file with a fixed number of data entries; 6) Repeat steps 1)-5), enter the next loop until the reading of the tool vibration data ends; The working process of mode b includes: 1) Read the tool vibration data collected by the sensor and write it into the numpy_data array; 2) Through format conversion, convert the one-dimensional array into a two-dimensional array with N rows and three columns to obtain the channel readings of the vibration sensor on the X-axis, Y-axis, and Z-axis for each sampling; 3) Set a loop flag variable flag and initialize the value of flag to 0; 4) When the channel reading of the Z-axis is greater than the set threshold V0, record the current time, generate an empty CSV format file with the folder, current time, and file serial number as the file save path, and set the value of flag to 1; 5) When the flag value is 1, add the data collected each time to the empty array data_buffer. When the number of data entries in this array is less than the set value, add data in a loop; when the number of elements in the first dimension of the array data_buffer reaches the set value N1, write all the data in data_buffer into a CSV format file at once, clear data_buffer and set the flag value to 0 to complete writing a fixed number of data entries. 6) Repeat steps 1)-5) to enter the next loop until the reading of the tool vibration data ends.
3. The method for collecting and processing tool vibration signals based on edge computing according to claim 1, characterized in that, In step S3, the edge computing device stores the tool vibration data by time. The working process includes: 1) Set the time flag bit time_flag and set the initial value of time_flag to 0; Set the timing thread. After timing for M0 minutes, set time_flag to 1; 2) When it is detected that the input Z-axis channel reading is greater than the set threshold V0, record the current time, generate the file save path, and then set the flag value to 1; 3) When the timing thread detects that flag = 1 and time_flag = 0, it triggers the start of timing; 4) When the flag value is 1, write data normally. When the timing time reaches the set time M0, set time_flag to 1, time to 0, and end the thread; wait for the end of the next creation of a new thread.
4. The acquisition and processing method of the tool vibration signal based on edge computing according to claim 1, wherein, In step S1, the acceleration value of the tool is used as the data representing the tool vibration signal, and the tool vibration signal data collected is stored in the sensor in the form of a binary file.
5. The implementation system of the acquisition and processing method of the tool vibration signal based on edge computing according to any one of claims 1-4, wherein, It includes: A data acquisition module for acquiring tool vibration signal data; A data reading module for reading tool vibration signal data; A data storage module for storing the tool vibration data; A data preprocessing module for preprocessing the tool vibration data and then sending the processed data to the cloud for storage; at the same time, the edge computing device sends the unprocessed tool vibration data to the cloud for real-time display.
Citation Information
Patent Citations
Cutting state edge intelligent monitoring method based on online incremental wear evolution model
CN111890127A
Vibration state intelligent monitoring system and method
CN112504710A