Summary of the invention
The technical problem to be solved by the present invention is to independent only for some dimension for the monitoring of robot in the prior art
Analysis cannot carry out integrated diagnosing and analyzing to all dimensions to you.
The present invention solves above-mentioned technical problem by the following technical programs:
A kind of real-time method for monitoring abnormality of robot based on isolated forest machine learning, comprising the following steps:
Data acquisition: the real-time number in the historical data and robot monitoring process under robot is well run is acquired
According to;
Modeling: isolated forest machine learning is based on using historical data and establishes abnormality detection model;
Detection: the real time data input exception monitoring model carries out abnormality detection, and output test result.
Preferably, the modeling detailed process are as follows:
Characteristic data set generates: historical data when well running to robot is cleaned, the feature after definition process
Data set is D1;
Abnormal data set generates: abnormality multi-dimensional robot degree is manually set according to the collection of formation and is combined into abnormal data
Collection, is defined as D2,
Training dataset generates: being characterized the set of data set and abnormal data set, i.e. D3=D1 ∪ D2, wherein characteristic
It is higher than abnormal data set quantity according to collection quantity;
Modeling:
1) it is concentrated from training data and randomly chooses n sample point m subset Ω i, i ∈ 1,2..m of composition, in m subset
Construct decision tree;
2) feature in Ω i is randomly choosed, a threshold value is randomly choosed and carries out binary fission;The threshold value, which results from, to be worked as
Prosthomere point data middle finger is determined between the maximum value of feature and minimum value;
3) recurrence 2) building decision tree, until in the height d or each leaf node that decision tree reaches setting only one
A point;
4) m decision tree is built up, its outlier threshold is defined according to the mean depth of m decision tree.
Preferably, the detection specifically: abnormality detection model exports abnormal point of normalization according to the real time data of input
Number, when abnormality score is greater than outlier threshold, then the real time data is abnormal data.
Preferably, to the cleaning method of historical data are as follows: delete shortage of data value and be expert at, delete format content mistake
Row, the extraneous datas column such as erasing time stamp.
The present invention also provides a kind of real-time exception monitoring systems of the robot based on isolated forest machine learning, including
Data acquisition module: it acquires real-time in the historical data and robot monitoring process under robot is well run
Data;
Modeling module: isolated forest machine learning is based on using historical data and establishes abnormality detection model;
Detection module: the real time data input exception monitoring model carries out abnormality detection, and output test result.
Preferably, the modeling detailed process are as follows:
Characteristic data set generates: historical data when well running to robot is cleaned, the feature after definition process
Data set is D1;
Abnormal data set generates: abnormality multi-dimensional robot degree is manually set according to the collection of formation and is combined into abnormal data
Collection, is defined as D2,
Training dataset generates: being characterized the set of data set and abnormal data set, i.e. D3=D1 ∪ D2, wherein characteristic
It is higher than abnormal data set quantity according to collection quantity;
Modeling:
1) it is concentrated from training data and randomly chooses n sample point m subset Ω i, i ∈ 1,2..m of composition, in m subset
Construct decision tree;
2) feature in Ω i is randomly choosed, a threshold value is randomly choosed and carries out binary fission;Threshold value, which results from, works as prosthomere
In point data between the maximum value and minimum value of specific characteristic;
3) recurrence 2) building decision tree, until in the height d or each leaf node that decision tree reaches setting only one
A point;
4) m decision tree is built up, its outlier threshold is defined according to the mean depth of m decision tree.
Preferably, the detection specifically: abnormality detection model exports abnormal point of normalization according to the real time data of input
Number, when abnormality score is greater than outlier threshold, then the real time data is abnormal data.
Preferably, to the cleaning method of historical data are as follows: delete shortage of data value and be expert at, delete format content mistake
Row, the extraneous datas column such as erasing time stamp.
The present invention has the advantages that
(1) multi-dimensional data comprehensive analysis can be directed to based on the side monitoring model that isolated forest machine learning is established,
Improve the accuracy of detection;
(2) without carrying out a large amount of calibration by hand to training sample;
(3) model commonality is strong, is applicable to the real-time abnormality detection of all brand robots.
Specific embodiment
The effect of to make to structure feature of the invention and being reached, has a better understanding and awareness, to preferable
Examples and drawings cooperation detailed description, is described as follows:
As shown in Figure 1, the present embodiment provides a kind of real-time exception monitoring sides, robot based on isolated forest machine learning
Method, comprising the following steps:
Step 1, data acquisition: the reality in the historical data and robot monitoring process under robot is well run is acquired
When data;Data are multidimensional data, according to actual monitoring needs, the data letter at selection acquisition each joint of robot or other positions
Breath.
Step 2, modeling: isolated forest machine learning is based on using historical data and establishes abnormality detection model;
Specific modeling process are as follows:
1, the generation of various data sets is first carried out
Characteristic data set generates: historical data when well running to robot is cleaned: deleting shortage of data value institute
It is expert at, deletes format content error row, the extraneous datas such as erasing time stamp arrange, and the characteristic data set after definition process is D1, such as
Table 1;
Table 1
id |
time |
f1 |
f2 |
f3 |
f4 |
f5 |
.... |
fn |
1 |
0801 |
2.3 |
-3.0 |
14 |
20 |
48 |
.... |
48 |
1 |
0802 |
2.4 |
-2.91 |
14 |
20 |
48.1 |
.... |
48.1 |
1 |
0803 |
2.6 |
-2.8 |
14 |
21 |
48 |
.... |
48 |
1 |
0804 |
3.0 |
-2.77 |
15 |
20 |
47.9 |
.... |
48.2 |
Wherein id is the device number of robot, and time is the timestamp that robot uploads data, and f1, f2 ..., fn are machines
The operating parameter (such as each joint electric current and temperature) of device people.
Abnormal data set generates: abnormality multi-dimensional robot degree is manually set according to the collection of formation and is combined into abnormal data
Collection, is defined as D2;As artificially improved the robot speed of service to 1.5 times of normal running speed and defining this state as abnormal shape
State;
Training dataset generates: being characterized the set of data set and abnormal data set, i.e. D3=D1 ∪ D2, wherein characteristic
It is higher than abnormal data set quantity according to collection quantity;
Model training parameter setting: model training parameter A=D2/D3;As abnormal data set D2 has 10 datas, training number
There are 1000 datas according to collection, then contamination=10/1000=0.01;
Model training parameter setting: contamination parameter is the ratio of training dataset D3 shared by abnormal data set D2
Example.Example: abnormal data set D2 has 10 datas, and training dataset has 1000 datas, then contamination=10/
1000=0.01:
Contamination=| D2 |/| D3 |
2, it then models
1) it is concentrated from training data and randomly chooses n sample point m subset Ω i, i ∈ 1,2..m of composition, in m subset
Construct decision tree;
2) feature in Ω i is randomly choosed, a threshold value is randomly choosed and carries out binary fission;The threshold value, which results from, to be worked as
Prosthomere point data middle finger is determined between the maximum value of feature and minimum value;
3) recurrence 2) building decision tree, until in the height d or each leaf node that decision tree reaches setting only one
A point;
4) m decision tree is built up, its outlier threshold is defined according to the mean depth of m decision tree.Obtain each test
After the mean depth of data, can be lower than the test data of this threshold value taking human as one threshold value (boundary value) of setting, mean depth
For exception.
Model default parameters tuning.Data set D3 defines robot and exists as the isolated forest model of training dataset training
Normal operating condition drag erroneous judgement normal data is that the ratio of abnormal data is false alarm rate:
False alarm rate=| D4 |/| D1 |, wherein D4 is the collection that normal data is determined as abnormal data under normal operating conditions
It closes.
Robot is false dismissed rate in the ratio that abnormal operating condition drag erroneous judgement abnormal data is normal data:
False dismissed rate=| D5 |/| D2 |, wherein D5 is the collection that abnormal data is determined as normal data under abnormal operating condition
It closes.
Occur to reduce false alarm rate and false dismissed rate as far as possible, promote experiment effect, the default that can adjust isolated forest passes
Ginseng value.Wherein, n_estimators is subtree number, and isolated forest is made of subtree, and final judgement result is by all sons
Tree codetermines;Max_samples is the training sample number for constructing every stalk tree.Adjust n_estimators and max_
The value and the false alarm rate and false dismissed rate of statistical machine people in normal state of samples, by test of many times, as the max_ of model
When samples parameter is set as 300, n_estimators parameter and is set as 150, the average false-alarm of robot in normal state
Rate is 0.03%, and average false dismissed rate is 0.16% under abnormality, and modelling effect is preferable.
Step 3, detection: as shown in Fig. 2, abnormality detection model exports abnormal point of normalization according to the real time data of input
Number, when abnormality score is greater than outlier threshold, then the real time data is abnormal data.General definition normalization abnormality score is greater than
0.6 data are abnormal data, and the abnormality degree of data is directly proportional with normalization abnormality score.Example: one robot of input
Temperature and current data d1=[2.3,2.6,3.0, -1.2......., 35], trained good isolated forest model export normalizing
Change abnormality score normalizedAnomalyScore=0.71.Since normalizedAnomalyScore=0.71 is greater than
0.6, judge this data for abnormal data.
The present embodiment also provides a kind of real-time exception monitoring system of the robot based on isolated forest machine learning, including
Data acquisition module: it acquires real-time in the historical data and robot monitoring process under robot is well run
Data;Data are multidimensional data, according to actual monitoring needs, the data letter at selection acquisition each joint of robot or other positions
Breath.
Modeling module: isolated forest machine learning is based on using historical data and establishes abnormality detection model;
Isolated forest machine learning, which is based on, using historical data establishes abnormality detection model;
Specific modeling process are as follows:
1, the generation of various data sets is first carried out
Characteristic data set generates: historical data when well running to robot is cleaned: deleting shortage of data value institute
It is expert at, deletes format content error row, the extraneous datas such as erasing time stamp arrange, and the characteristic data set after definition process is D1, such as
Table 1;
Table 1
id |
time |
f1 |
f2 |
f3 |
f4 |
f5 |
.... |
fn |
1 |
0801 |
2.3 |
-3.0 |
14 |
20 |
48 |
.... |
48 |
1 |
0802 |
2.4 |
-2.91 |
14 |
20 |
48.1 |
.... |
48.1 |
1 |
0803 |
2.6 |
-2.8 |
14 |
21 |
48 |
.... |
48 |
1 |
0804 |
3.0 |
-2.77 |
15 |
20 |
47.9 |
.... |
48.2 |
Wherein id is the device number of robot, and time is the timestamp that robot uploads data, and f1, f2 ..., fn are machines
The operating parameter (such as each joint electric current and temperature) of device people.
Abnormal data set generates: abnormality multi-dimensional robot degree is manually set according to the collection of formation and is combined into abnormal data
Collection, is defined as D2;As artificially improved the robot speed of service to 1.5 times of normal running speed and defining this state as abnormal shape
State;
Training dataset generates: being characterized the set of data set and abnormal data set, i.e. D3=D1 ∪ D2, wherein characteristic
It is higher than abnormal data set quantity according to collection quantity;
Model training parameter setting: model training parameter A=D2/D3;As abnormal data set D2 has 10 datas, training number
There are 1000 datas according to collection, then contamination=10/1000=0.01;
Model training parameter setting: contamination parameter is the ratio of training dataset D3 shared by abnormal data set D2
Example.Example: abnormal data set D2 has 10 datas, and training dataset has 1000 datas, then contamination=10/
1000=0.01:
Contamination=| D2 |/| D3 |
2, it then models
1) it is concentrated from training data and randomly chooses n sample point m subset Ω i, i ∈ 1,2..m of composition, in m subset
Construct decision tree;
2) feature in Ω i is randomly choosed, a threshold value is randomly choosed and carries out binary fission;The threshold value, which results from, to be worked as
Prosthomere point data middle finger is determined between the maximum value of feature and minimum value;
3) recurrence 2) building decision tree, until in the height d or each leaf node that decision tree reaches setting only one
A point;
4) m decision tree is built up, its outlier threshold is defined according to the mean depth of m decision tree.Obtain each test
After the mean depth of data, can be lower than the test data of this threshold value taking human as one threshold value (boundary value) of setting, mean depth
For exception.
Model default parameters tuning.Data set D3 defines robot and exists as the isolated forest model of training dataset training
Normal operating condition drag erroneous judgement normal data is that the ratio of abnormal data is false alarm rate:
False alarm rate=| D4 |/| D1 |, wherein D4 is the collection that normal data is determined as abnormal data under normal operating conditions
It closes.
Robot is false dismissed rate in the ratio that abnormal operating condition drag erroneous judgement abnormal data is normal data:
False dismissed rate=| D5 |/| D2 |, wherein D5 is the collection that abnormal data is determined as normal data under abnormal operating condition
It closes.
Occur to reduce false alarm rate and false dismissed rate as far as possible, promote experiment effect, the default that can adjust isolated forest passes
Ginseng value.Wherein, n_estimators is subtree number, and isolated forest is made of subtree, and final judgement result is by all sons
Tree codetermines;Max_samples is the training sample number for constructing every stalk tree.Adjust n_estimators and max_
The value and the false alarm rate and false dismissed rate of statistical machine people in normal state of samples, by test of many times, as the max_ of model
When samples parameter is set as 300, n_estimators parameter and is set as 150, the average false-alarm of robot in normal state
Rate is 0.03%, and average false dismissed rate is 0.16% under abnormality, and modelling effect is preferable.
Detection module: as shown in Fig. 2, abnormality detection model exports normalization abnormality score according to the real time data of input,
When abnormality score is greater than outlier threshold, then the real time data is abnormal data.General definition normalization abnormality score is greater than 0.6
Data be abnormal data, and the abnormality degree of data and normalize abnormality score it is directly proportional.Example: one robot temperature of input
With current data d1=[2.3,2.6,3.0, -1.2......., 35], trained good isolated forest model output normalizes different
Ordinary index normalizedAnomalyScore=0.71.Since normalizedAnomalyScore=0.71 is greater than 0.6, sentence
This data of breaking are abnormal data.
The basic principles, main features and advantages of the present invention have been shown and described above.The technology of the industry
Personnel are it should be appreciated that the present invention is not limited to the above embodiments, and what is described in the above embodiment and the description is only the present invention
Principle, various changes and improvements may be made to the invention without departing from the spirit and scope of the present invention, these variation and
Improvement is both fallen in the range of claimed invention.The present invention claims protection scope by appended claims and its
Equivalent defines.