A kind of assembly contact condition recognition methods of non-rigid part
Technical field
The invention belongs to machine learning and robotic asssembly technical field, it is suitable for feeling letter using industrial robot assembly force
Breath carries out the field of the assembly contact condition identification of non-rigid part.Specifically, being related to a kind of based on Box-Cox Gaussian turn
It changes, the assembly contact condition recognition methods of the sorting algorithm of intercommunication weighting naive Bayesian,
Background technique
Robot is the most indispensable key factor of the following intelligence manufacture.With technologies such as artificial intelligence, Internet of Things
The application of development and the promotion of factory automation level, industrial robot is also more more and more universal, and becomes and push industry 4.0
Important force.Non-rigid part is widely present in automobile and electric equipment products, and in such part because assembly difficulty is larger, with
Based on manual assembly.Therefore under these circumstances, improving non-rigid part robot automation assembly level seems especially urgent.
The control of size and position and attitude to power is the key problem of robotic asssembly technology.Contact condition identification
Purpose is mainly robot Shared control strategy, control system and control program provide theoretical knowledge.Contact condition identification
Method mainly has the modeling based on assembly geological information and two kinds of the recognizer based on environmental information.Based on geological information
Modelling application in the assembly of geometry simple rule, by solve under all possible way of contact direction of contact force with
Size obtains each contact condition model.However when assembly is complex-shaped, it is difficult to carry out accurate stress point to assembly
Analysis, therefore most of assembly occasions are dfficult to apply to by the modeling method of geological information completely.Identification based on environmental information
Algorithm is divided into view-based access control model information and power feels two kinds of recognition methods of information.The recognition methods of view-based access control model information is taken the photograph using industry
Camera shoots assembly, obtains contact condition by image procossing.However when Assembly part or assembly contact occur in part
When portion, industrial camera is difficult to obtain clearly part image, and inside parts contact condition can not be judged according to image.Therefore it is based on
The recognition methods of visual information is not suitable for the part of interior contact.The recognition methods that information is felt based on power is to utilize force snesor
The force data in assembling process is obtained, classifier is obtained by the data characteristic that intelligent algorithm learns each contact condition.For
Assembly force instability problem caused by non-rigid part, the accuracy rate identified using common intelligent algorithm are lower.Although multiple
Miscellaneous machine learning algorithm can be improved classification accuracy, but need the longer calculating time, it is difficult to be applied to Practical Project
Field.
Therefore, design it is a kind of towards non-rigid component assembly process and the simple contact condition recognition methods of algorithm structure,
It is very important to the research and development in industrial robot assembly field.
Summary of the invention
In order to overcome the problems, such as that existing classification method is insufficient to non-rigid part classification precision and time-consuming long, the present invention is provided
A kind of assembly contact condition recognition methods of higher, the time-consuming shorter non-rigid part of nicety of grading, based on Gaussian conversion and
Intercommunication weighting NB Algorithm realizes classification.
The technical solution adopted by the present invention to solve the technical problems is:
A kind of assembly contact condition recognition methods of non-rigid part, comprising the following steps:
Step 1: establishing training dataset { Xtrain, Ctrain } and test data set { Xtest, Ctest };
Wherein, Xtrain, Xtest are the sextuple force data X=(f acquired in assembling processx,fy,fz,mx,my,mz), fx,
fy,fzRespectively along x, y, the force data in z-axis direction, mx,my,mzRespectively around x, y, the torque data of z-axis, Ctrain, Ctest
For respectively with Xtrain, the corresponding contact condition of Xtest, i.e. classification belonging to data;
Step 2: the training data Xtrain after being normalized according to formula (1)*With test data Xtest*;
Step 3: using training data Xtrain*, according to formula (2), by minimizing log-likelihood function lnLmax(λ)
Calculate the parameter lambda of every one-dimensional data Gaussian conversioni(i=1,2 ..., 6);
In formula: residual sum of squares (RSS) lnQe(λ,z(λ)) calculated according to formula (3)-(6);
lnQe(λ,z(λ))=z(λ)'(I-X(X'X)-1X')z(λ) (3)
Step 4: the Gaussian conversion parameter λ obtained using step 3i(i=1,2 ..., 6), obtain height according to formula (7)
This changes the training data Xtrain after conversion(λ)With test data Xtest(λ);
Step 5: calculating Xtrain(λ)And Xtest(λ)The mean value of every one-dimensional data, by Xtrain(λ)And Xtest(λ)It subtracts pair
The mean value answered obtains centralization treated training data Xtrain(m)With test data Xtest(m);
Step 6: calculating prior probability p (ck);
In formula: Si is to belong to ckThe training data quantity of class, S are training data total quantity;
Step 7: being calculated according to formula (9) per one-dimensional training data Xtrain(m)With the mutual information I of contact condition Ctrain
(Xtrain(m);Ctrain), the weight w of every one-dimensional data is then calculated according to public formula (IX)i(i=1,2 ..., 6);
Step 8: calculating Gaussian probability-density function p (x according to formula (11)i|ck);
In formula: xiFor test data Xtest(m) i(i=1,2 ..., 6), calculate training data Xtrain according to formula (12)(m)Mean vector uk, training data Xtrain is calculated according to formula (13)(m)Diagonal covariance matrix ∧k;
Step 9: the prior probability p (c that step 6-8 is obtainedk), weight wiWith Gaussian probability-density function p (xi|ck), generation
Enter formula (14) and calculates posterior probability C (Xtest(m) i);
Step 10: comparing posterior probability, sort data into the maximum classification of posterior probability.It will finally predict classification C
(Xtest (m)) and concrete class Ctest comparison, draw classification results figure.
Beneficial effects of the present invention are mainly manifested in:
Have calculating speed fast 1. Gaussian weights Bayesian Classification Arithmetic, can adapt to the spy of non-gaussian distribution data
Point.
2. based on Gaussian weighting Bayesian Classification Arithmetic non-rigid assemble contact condition classification in terms of it is more accurate and
It is time-consuming less.
Detailed description of the invention
Fig. 1 is that the non-rigid based on Gaussian weighting Bayesian Classification Arithmetic assembles contact condition classification process figure
Fig. 2 is non-rigid component assembly contact condition classification results figure.
Specific embodiment
The invention will be further described below in conjunction with the accompanying drawings.
Referring to Figures 1 and 2, the assembly contact condition recognition methods of a kind of non-rigid part, comprising the following steps:
Step 1: establishing training dataset { Xtrain, Ctrain } and test data set { Xtest, Ctest };
Wherein, Xtrain, Xtest are the sextuple force data X=(f acquired in assembling processx,fy,fz,mx,my,mz), fx,
fy,fzRespectively along x, y, the force data in z-axis direction, mx,my,mzRespectively around x, y, the torque data of z-axis, Ctrain, Ctest
For respectively with Xtrain, the corresponding contact condition of Xtest, i.e. classification belonging to data;
Step 2: the training data Xtrain after being normalized according to formula (1)*With test data Xtest*;
Step 3: using training data Xtrain*, according to formula (2), by minimizing log-likelihood function lnLmax(λ)
Calculate the parameter lambda of every one-dimensional data Gaussian conversioni(i=1,2 ..., 6);
In formula: residual sum of squares (RSS) lnQe(λ,z(λ)) calculated according to formula (3)-(6);
lnQe(λ,z(λ))=z(λ)'(I-X(X'X)-1X')z(λ) (3)
Step 4: the Gaussian conversion parameter λ obtained using step 3i(i=1,2 ..., 6), obtain height according to formula (7)
This changes the training data Xtrain after conversion(λ)With test data Xtest(λ);
Step 5: calculating Xtrain(λ)And Xtest(λ)The mean value of every one-dimensional data, by Xtrain(λ)And Xtest(λ)It subtracts pair
The mean value answered obtains centralization treated training data Xtrain(m)With test data Xtest(m);
Step 6: calculating prior probability p (ck);
In formula: Si is to belong to ckThe training data quantity of class, S are training data total quantity;
Step 7: being calculated according to formula (9) per one-dimensional training data Xtrain(m)With the mutual information I of contact condition Ctrain
(Xtrain(m);Ctrain), the weight w of every one-dimensional data is then calculated according to public formula (IX)i(i=1,2 ..., 6);
Step 8: calculating Gaussian probability-density function p (x according to formula (11)i|ck);
In formula: xiFor test data Xtest(m) i(i=1,2 ..., 6), calculate training data Xtrain according to formula (12)(m)Mean vector uk, training data Xtrain is calculated according to formula (13)(m)Diagonal covariance matrix ∧k;
Step 9: the prior probability p (c that step 6-8 is obtainedk), weight wiWith Gaussian probability-density function p (xi|ck), generation
Enter formula (14) and calculates posterior probability C (Xtest(m) i);
Step 10: comparing posterior probability, sort data into the maximum classification of posterior probability.It will finally predict classification C
(Xtest (m)) and concrete class Ctest comparison, draw classification results figure.