Disclosure of Invention
In order to solve the technical problem that abnormal data in temperature data can be identified as normal data due to the fact that accuracy is reduced when the DBSCAN algorithm is used for detecting the abnormal data, the invention provides a temperature monitoring method and a temperature monitoring system for a numerical control machine tool.
In a first aspect, the present invention provides a temperature monitoring method for a numerically-controlled machine tool, which adopts the following technical scheme:
a temperature monitoring method for a numerically controlled machine tool, comprising the steps of:
Acquiring temperature data, acquiring primary similarity between the two temperature data, and acquiring noise possibility of each temperature data;
obtaining the degree of similarity between two temperature data ,Representing a primary degree of similarity between the two temperature data; A noise likelihood representing the first temperature data; a noise likelihood representing the second temperature data; Representing a second hyper-parameter, norm () representing a normalization function, and acquiring neighborhood data of each temperature data according to the similarity between the two temperature data, thereby realizing anomaly detection.
The invention has the innovation that the similarity degree between the temperature data can be more comprehensively analyzed by redefining the distance measurement mode of each temperature data when the number of the neighborhood data is determined through carrying out change feature analysis on the temperature data and the speed data of the numerical control machine tool, so that the calculation of the similarity degree is more in line with the actual situation, the accuracy of abnormality detection is improved, the real-time monitoring of the state of the machine tool can be realized, potential problems can be found in time, and the safety and the reliability of the machine tool are improved.
Preferably, the acquiring the primary similarity between the two temperature data includes:
acquiring a numerical expression factor of each temperature data;
;
In the formula, Representing a primary degree of similarity between the two temperature data; a numerical expression factor representing the first temperature data; a numerical expression factor representing the second temperature data; Representing a first superparameter; Representing the sampling time interval between the first temperature data and the second temperature data, exp () representing an exponential function based on a natural constant.
The greater the primary degree of similarity between the temperature data, the more similar the two temperature data.
Preferably, the acquiring the numerical expression factor of each temperature data includes:
and taking the product of the average value of the absolute values of the differences of all adjacent surrounding data of the ith temperature data and the value of the ith temperature data as a numerical expression factor of the ith temperature data.
And the primary similarity degree between the temperature data is acquired conveniently according to the difference of numerical expression factors between the temperature data.
Preferably, the acquiring the noise probability of each temperature data includes:
;
In the formula, A noise likelihood representing the ith temperature data; A value representing the ith temperature data; a temperature minimum value in the surrounding data representing the ith temperature data; A difference value between a maximum value and a minimum value of the temperature in the surrounding data representing the ith temperature data; A value representing the speed data at the sampling time corresponding to the i-th temperature data; A speed minimum value among all speed data at a sampling period corresponding to surrounding data representing the ith temperature data; represents the difference between the maximum speed and the minimum speed in all the speed data in the sampling period corresponding to the ambient data of the ith temperature data, and norm () represents the normalization function.
And the initial similarity degree between the temperature data is conveniently corrected according to the noise possibility difference between the temperature data, and the similarity degree between the two temperature data is obtained.
Preferably, the obtaining the neighborhood data of each temperature data according to the similarity between the two temperature data, so as to realize anomaly detection, includes:
The method comprises the steps of presetting a neighbor parameter u and a threshold parameter T, acquiring neighbor data of temperature data for any one temperature data in a temperature data sequence, wherein the neighbor data are in a neighbor range of the temperature data and the similarity degree between the neighbor data and the temperature data is larger than the threshold parameter T, acquiring core points in the temperature data sequence, wherein the number of the neighbor data of the core points is larger than or equal to the neighbor parameter u, and acquiring all abnormal data in the temperature data sequence, and the number of the neighbor data of the abnormal data is smaller than the neighbor parameter u and does not belong to neighbor data of other core points.
The obtained abnormal data is more accurate.
Preferably, the acquiring the ambient data of each temperature data includes:
The number N of surrounding data is preset, and the first N pieces of temperature data and the last N pieces of temperature data of the ith temperature data are used as the surrounding data of the ith temperature data.
Preferably, the collecting temperature data includes:
And installing a temperature sensor on the numerical control machine tool, presetting the temperature sensor to be a sampling moment every two minutes, and sequentially acquiring temperature data each time for three hours.
In a second aspect, the invention provides a temperature monitoring system for a numerically-controlled machine tool, which adopts the following technical scheme:
A temperature monitoring system for a numerically controlled machine tool includes a processor and a memory storing computer program instructions that when executed by the processor implement a temperature monitoring method for a numerically controlled machine tool as described above.
By adopting the technical scheme, the temperature monitoring method for the numerical control machine tool generates a computer program, and the computer program is stored in the memory to be loaded and executed by the processor, so that terminal equipment is manufactured according to the memory and the processor, and the computer program is convenient to use.
The method has the technical effects that the method redefines the distance measurement mode of each temperature data when determining the number of neighborhood data by carrying out change feature analysis on the temperature data and the speed data of the numerical control machine tool, can more comprehensively analyze the similarity degree between the temperature data, can help distinguish abnormal data and normal data, and enables calculation of the similarity degree to be more in line with the actual situation, thereby improving the accuracy of abnormality detection, realizing real-time monitoring of the state of the machine tool, finding potential problems in time and improving the safety and reliability of the machine tool.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that when the terms "first," "second," and the like are used in the claims, the specification and the drawings of the present invention, they are used merely for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of the present invention are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The embodiment of the invention discloses a temperature monitoring method for a numerical control machine tool, which comprises the following steps of S1-S3 with reference to FIG. 1:
S1, collecting temperature data and speed data.
In the embodiment of the invention, a temperature sensor and a rotating speed sensor are arranged on a numerical control machine tool, two data types, namely temperature data and speed data, are sequentially collected every two minutes in a preset manner, the temperature data at each sampling time are used as a temperature data sequence, and the speed data at each sampling time are used as a speed data sequence.
S2, acquiring a numerical expression factor of each temperature data, acquiring a primary similarity degree between two temperature data according to the numerical expression factor of each temperature data, and acquiring the noise possibility of each temperature data according to the relativity of the corresponding temperature data and the speed data at the sampling moment.
It should be noted that when temperature data of a numerically controlled machine tool is collected, noise may occur in the temperature data due to unstable output of a temperature sensor caused by electromagnetic interference of other devices or power supplies around the numerically controlled machine tool, which may cause fluctuation or decrease of abnormal data in the temperature data into false normal data, while the existing DBSCAN algorithm realizes abnormal detection of data based on the number of neighborhood data of each data, wherein the determination of the number of neighborhood data of each data is based on analysis of the numerical value and sampling interval difference between two data, so that accuracy when abnormal detection is performed on the temperature data by using the DBSCAN algorithm is reduced due to the existence of noise, and abnormal data in the temperature data may be identified as normal data.
Step S2 includes step S20 to step S21, and is specifically as follows:
And S20, acquiring a numerical expression factor of each temperature data, and acquiring the primary similarity degree between the two temperature data according to the numerical expression factor of each temperature data.
When redefining the distance measurement mode of each temperature data in determining the number of the neighborhood data, analyzing the numerical expression between the temperature data and the sampling time interval time between the temperature data to obtain the initial similarity degree between the temperature data, and if the numerical difference between the two temperature data is smaller, the change characteristics of the surrounding data of the two temperature data are closer, and the sampling time interval of the two temperature data is smaller, indicating that the primary similarity degree between the two temperature data is larger.
In the embodiment of the present invention, the number N of surrounding data is preset, the first N pieces of temperature data and the last N pieces of temperature data of the ith temperature data are used as the surrounding data of the ith temperature data, in the embodiment of the present invention, the number n=30 of surrounding data is preset, and in other embodiments, the value of the number N of surrounding data can be preset by an implementation personnel according to specific implementation situations.
Taking the product of the average value of the absolute values of the differences of all adjacent surrounding data of the ith temperature data and the value of the ith temperature data as a numerical expression factor of the ith temperature data;
obtaining a primary degree of similarity between two temperature data:
;
In the formula, Representing a primary degree of similarity between the two temperature data; a numerical expression factor representing the first temperature data; a numerical expression factor representing the second temperature data; representing the first superparameter, in the embodiment of the invention, the first superparameter is preset In order to avoid a difference between the numerical expression factors of the first temperature data and the second temperature data of 0; a sampling time interval representing the first temperature data and the second temperature data; exp () represents an exponential function based on a natural constant; The smaller the value of (c) is, the closer the two temperature data are in terms of their own numerical manifestations and the surrounding data change characteristics, and the greater the primary degree of similarity between the two temperature data can be explained; The smaller the value of the two temperature data is, the larger the reference value of the two temperature data to each other is, the more consistent the working condition of the numerical control machine tool reflected by the two temperature data is, namely the closer the two temperature data are in terms of the numerical expression of the two temperature data and the change characteristics of surrounding data, the larger the reliability is, and the larger the primary similarity degree between the two temperature data is.
And S21, acquiring noise possibility of each temperature data.
It should be noted that, the initial similarity degree between the two temperature data is obtained, but the index is obtained by analyzing the numerical value and the sampling time interval between the two temperature data, so that only whether the two temperature data are similar enough or not can be judged from the two layers of the numerical value and the sampling time interval, but the noise can cause abnormal data in the temperature data to fluctuate or actively reduce to normal data, so that the initial similarity degree between the two temperature data can not well solve the interference of the noise;
In the scene corresponding to the scheme, the cutting speed and the temperature of the numerical control machine tool have positive correlation, wherein the higher the cutting speed is, the higher the relative speed between the cutting tool and the workpiece is, so that friction and cutting deformation energy is increased, more heat is generated, the surface temperature of the cutter and the workpiece is increased, the noise possibility of each temperature data is obtained by analyzing the change characteristics of the speed data and the temperature data at the corresponding moment, and the lower the noise possibility of the temperature data at the corresponding moment can be illustrated if the change correlation between the two data at the corresponding moment is stronger.
In the embodiment of the invention, the noise possibility of each temperature data is acquired:
;
In the formula, A noise likelihood representing the ith temperature data; A value representing the ith temperature data; a temperature minimum value in the surrounding data representing the ith temperature data; A difference value between a maximum value and a minimum value of the temperature in the surrounding data representing the ith temperature data; A value representing the speed data at the sampling time corresponding to the i-th temperature data; A speed minimum value among all speed data at a sampling period corresponding to surrounding data representing the ith temperature data; Representing the difference between the maximum value and the minimum value of all the velocity data in the sampling time period corresponding to the surrounding data of the ith temperature data; representing the relative magnitude of the ith temperature data in its surrounding data; Representing the relative numerical value of the speed data in the surrounding data of the speed data at the sampling time corresponding to the ith temperature data; the larger the temperature data and the speed data at the sampling time corresponding to the ith temperature data are, the worse the relativity of the temperature data and the speed data is, the more likely the ith temperature is affected by noise, and the higher the noise possibility of the ith temperature data is.
S3, correcting the initial similarity degree between the two temperature data according to the noise possibility of each temperature data to obtain the similarity degree between the two temperature data, and obtaining the neighborhood data of each temperature data according to the similarity degree between the two temperature data to further realize anomaly detection.
Step S3 includes step S30-step S31, specifically as follows:
s30, correcting the initial similarity degree between the two temperature data according to the noise possibility of each temperature data, and obtaining the similarity degree between the two temperature data.
It should be noted that, if the difference in noise probability between the two temperature data is smaller, the degree of similarity between the two temperature data is larger, and if the difference in noise probability between the two temperature data is larger, the degree of similarity between the two temperature data is smaller, so that the initial degree of similarity between the two temperature data is corrected according to the difference in noise probability between the two temperature data, and the degree of similarity between the two temperature data is obtained.
In the embodiment of the invention, the similarity degree between two temperature data is obtained:
;
In the formula, Representing the degree of similarity between the two temperature data; representing a primary degree of similarity between the two temperature data; A noise likelihood representing the first temperature data; a noise likelihood representing the second temperature data; representing the second super-parameter, in the embodiment of the invention, the second super-parameter is preset In order to avoid the difference between the noise probability of the first temperature data and the second temperature data being 0; The greater the value of (c), the greater the degree of similarity between the two temperature data, The smaller the value of (c) is, the smaller the difference in noise probability between the two temperature data is, the closer the sampling fidelity of the two temperature data is, and the greater the value of mutual reference between the two temperature data is, the greater the degree of similarity between the two temperature data is.
S31, obtaining neighborhood data of each temperature data according to the similarity between the two temperature data, and further realizing anomaly detection.
It should be noted that, the existing DBSCAN algorithm is known to realize the anomaly detection of data based on the number of the neighborhood data of each data, and the determination of the number of the neighborhood data of each data is based on the analysis of the numerical value and the sampling interval difference between two data, so that the accuracy in the anomaly detection of temperature data by using the DBSCAN algorithm is reduced due to the existence of noise, and therefore, the invention can detect the anomaly data affected by noise based on the similarity between two temperature data when the determination of the number of the neighborhood data of each data is based on the similarity between two temperature data, and therefore, the invention acquires the neighborhood data of each temperature data according to the similarity between the temperatures, thereby realizing the anomaly detection.
In the embodiment of the invention, a neighbor parameter is presetA neighborhood parameterAnd a threshold parameterFor the ith temperature data, the temperature data before the ith temperature dataA sequence of temperature data is recorded as the neighborhood range of the ith temperature data, and if the similarity degree between any one temperature data in the neighborhood range of the ith temperature data and the ith temperature data is larger than the threshold value parameterRecording the temperature data as the neighborhood data of the ith temperature data, if the number of the neighborhood data of the ith temperature data is greater than or equal to the neighborhood parameterMarking the ith temperature data as a core point, if the number of neighborhood data of the ith temperature data is smaller than that of the neighbor parametersWhen the ith temperature data belongs to the neighborhood data of other core points, the ith temperature data is marked as a boundary point, if the number of the neighborhood data of the ith temperature data is smaller than that of the neighborhood parametersWhen the ith temperature data does not belong to the neighborhood data of other core points, marking the ith temperature data point as abnormal data;
All core points and boundary points in the temperature data sequence are divided into clusters through the method, all outliers in the temperature data sequence are divided into outliers, and all outliers are used as outlier data of the temperature data sequence.
The embodiment of the invention also discloses a temperature monitoring system for the numerical control machine tool, which comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions realize the temperature monitoring method for the numerical control machine tool according to the invention when the computer program instructions are executed by the processor.
The above system further comprises other components well known to those skilled in the art, such as a communication bus and a communication interface, the arrangement and function of which are known in the art and therefore are not described in detail herein.
In the context of this patent, the foregoing memory may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, the computer readable storage medium may be any suitable magnetic or magneto-optical storage medium, such as, for example, resistance change memory, dynamic random access memory, static random access memory, enhanced dynamic random access memory, high bandwidth memory, hybrid storage cube, etc., or any other medium that can be used to store the desired information and that can be accessed by an application, a module, or both. Any such computer storage media may be part of, or accessible by, or connectable to, the device.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.
The above embodiments are not intended to limit the scope of the invention, so that the equivalent changes of the structure, shape and principle of the invention are covered by the scope of the invention.