Disclosure of Invention
The purpose of the invention is as follows: the invention aims to solve the defects in the prior art and provides a method for constructing a terminal performance prediction model of a robot based on a GA-RBF network.
The technical scheme is as follows: the invention discloses a method for constructing a terminal performance prediction model of a robot based on a GA-RBF network, which comprises the following steps:
(1) an axis joint acquisition hardware platform for acquiring data at the tail end of the robot is built, and an EtherCAT bus and a laser tracker are used as auxiliary tools for tail end test and are respectively used as input and output data acquisition modes for training a GA-RBF network;
(2) and acquiring the position, speed and torque feedback of each joint in real time through an EtherCAT bus to obtain data serving as the input of a GA-RBF network, and acquiring tail end data serving as the output of the GA-RBF network by using a laser tracking coordinate measuring system to train a robot tail end performance prediction model based on the GA-RBF network.
Further, the shaft joint acquisition hardware platform include servo driver, RC controller, demonstrator and host computer, servo driver include a plurality ofly, each servo driver one end is connected with each joint for gather position, speed, the torque data of each joint, the other end gathers to the RC controller through the EtherCAT bus, the RC controller still is connected with demonstrator and host computer.
Furthermore, the servo driver comprises a therCAT communication module.
Furthermore, the laser tracking coordinate measuring system comprises a laser tracker host, a tracking camera, an upper computer and a T-Mac sensor, wherein the laser tracker host is respectively connected with the tracking camera, the upper computer and the T-Mac sensor through communication cables, and the system is used for collecting the tail end position and the speed parameter data of the robot in real time.
Further, the T-Mac sensor is arranged in the center of an end plane of the end flange of the robot.
Further, the process of forming the robot end performance prediction model comprises the following steps:
(1) selecting sample data: selecting and analyzing according to sample data, taking at least 240 pairs of data as RBF network training samples, namely taking the positions of six axis joints acquired by an EtherCAT real-time data acquisition bus as input, correspondingly, acquiring the tail end position by a laser tracker as output, and forming tail end position parameter training sample data;
(2) normalization: all data are converted into a [0,1] interval for normalization, and the normalization method is realized by a linear conversion function, as shown in the formula:
in the formula: x'kIs the input value, x, of the normalized converted networkkIs the original sample data, xmax、xminRespectively the maximum value and the minimum value in the original sample data;
(3) GA (genetic algorithm) optimizes RBF network parameters: the method comprises the steps of initializing parameter setting, initial population and chromosome coding, and GA optimization program;
(4) selecting a test sample: as a verification for the established RBF model, at least 50 groups of data are selected from the previously collected training data, or at least 50 groups of data are tested in addition to be used as test data samples;
(5) reverse normalization: and (3) substituting the test sample data into the terminal data prediction model based on the RBF network obtained by training, performing inverse normalization to obtain terminal data of the predicted robot, comparing the terminal data with the terminal data of the actual robot to confirm the feasibility of the model, and retraining the RBF network according to the steps (1) to (3) when the deviation between the predicted data and the measured data is large.
Further, the genetic initialization parameter setting in the step (3) includes: the population size N is 30, the evolution generation P is 100, the cross probability Pc is 0.8, and the variation probability Pm is 0.15.
Further, the initial population and the chromosome code in the step (3) specifically include: first, according to the general formula of the number of hidden layer nodes:
wherein m is the number of nodes of the output layer, and n is the number of nodes of the input layer, and the structure of the network is determined; in the process of building a prediction model based on the terminal parameters of the RBF network, the pulse of the six-freedom-degree axial joint is used as an input, so that an input node n is set to be 6, the terminal position is a three-dimensional spatial position, so that an output node m is set to be 3, and a is set to be [1,10 & lt/EN & gt ]]Within the range, for rounding setting a to 3, then h to 6; the network is a 6-6-3 structure, and then the genetic RBF center vector is 6 multiplied by 6, the basis function width vector is 6 multiplied by 1, and the weight vector is 6 multiplied by 3.
Further, the GA optimization procedure in the step (3) specifically adopts a genetic algorithm to optimize RBF network parameters to obtain a most suitable basis function width vector B meeting the precision requirementpCenter vector CpAnd a weight vector Wp。
Has the advantages that: the invention has the following beneficial effects:
1. the real-time industrial Ethernet is changed into a data acquisition bus from the traditional control bus function, so that the method is significant, the acquisition precision of the shaft joint servo pulse is greatly improved, and the high-precision data research is closer to the practical significance for the application of subsequent RBF network on the prediction of the tail end data;
2. by comparing the end parameters calculated by the DH model with the end parameters calculated by the GA-RBF neural network, it can be known that: the consistency of the end data calculated by the RBF network and the data actually measured by the laser tracker is better, and the data are more suitable for being used as the basis of subsequent index calculation;
3. the diagnosis result of the robot fault simulation experiment based on the GA-RBF network shows that the error between the test output and the expected output is small, the error probability is small, and the robot fault detection requirement can be met.
Detailed Description
The technical solution of the present invention will be further described in detail with reference to the following specific examples.
The invention discloses a GA-RBF network-based robot end performance test method, which comprises the following steps:
(1) an axis joint acquisition hardware platform for acquiring data at the tail end of the robot is built, and an EtherCAT bus and a laser tracker are used as auxiliary tools for tail end test and are respectively used as input and output data acquisition modes for training a GA-RBF network;
(2) and acquiring the position, speed and torque feedback of each joint in real time through an EtherCAT bus to obtain data serving as the input of a GA-RBF network, and acquiring tail end data serving as the output of the GA-RBF network by using a laser tracking coordinate measuring system to train a robot tail end performance prediction model based on the GA-RBF network.
The method for testing the terminal performance of the robot based on the GA-RBF network is specifically described as follows:
1. construction of robot tail end data acquisition hardware platform
1.1EtherCAT axial Joint data acquisition
As shown in the figures 1 and 3, the RC control driver and the DS servo driver are developed into EtherCAT master and slave stations, so that the parameters of six-axis joints of the robot can be acquired in real time, and the accuracy of the tail end test of the robot is improved. And then, reading the acquired position and speed data through an RC (remote control) controller, and finally analyzing the acquired data so as to facilitate analysis.
FIG. 1 shows, the axis joint gathers hardware platform and includes servo driver, RC controller (robot control), demonstrator and host computer, servo driver include a plurality ofly, each servo driver one end is connected with each joint for gather position, speed, the torque data of each joint, the other end gathers to the RC controller through the EtherCAT bus, the RC controller still is connected with demonstrator and host computer.
As shown in fig. 3, the servo driver includes a main controller, a rectifier module, an IPM inverter, a power module, an optical coupling isolation circuit, an EtherCAT communication module, a phase current detection, an encoder, a hall sensor, and a joint permanent magnet synchronous motor, where the input end of the main controller is connected to the phase current detection, the encoder, and the hall sensor, and both the encoder and the hall sensor are connected to the joint permanent magnet synchronous motor; the output end of the main controller is connected with an IPM inverter through an optical coupling isolation circuit, and the IPM inverter is also connected with phase current detection and a joint permanent magnet synchronous motor; the main controller is further connected with a power module and an EtherCAT communication module, and the power module is respectively connected with a direct-current switching power supply and an alternating-current power supply.
1.2 laser tracker collects robot end data
The whole process of acquiring the tail end data of the robot by the laser tracker is shown in figure 2, the laser tracking coordinate measuring system comprises a laser tracker host, a tracking camera, an upper computer and a T-Mac sensor (mechanical tracking), the laser tracker host is respectively connected with the tracking camera, the upper computer and the T-Mac sensor through communication cables, and the system is used for acquiring the tail end position and the speed parameter data of the robot in real time.
A T-Mac sensor in the laser tracking system is arranged in the center of an end plane of a robot tail end flange, and a communication cable is connected with an upper computer in a link mode, so that parameters such as tail end position and speed of the robot can be acquired.
2. Processing of data
2.1 synchronicity of data
Since sample data, i.e. the real-time acquired individual axis servo pulses and the laser tracker tip position and velocity parameters, are acquired by two different systems. Fig. 4 is a schematic diagram of a method for ensuring data acquisition synchronization. Assuming that the laser tracker starts to acquire the end data at the time t1, the EtherCAT bus starts to acquire the axis joint data at the time t2, and the robot starts to move at the time t3, since the data acquired by the laser tracker and the EtherCAT before the time t3 are acquired in the static state of the robot, the data are both the start point data, and the data are invalid data in the experiment and are all discarded. The data collected after the robot starts to move are used as effective data, and the tail end or the shaft joint takes the moment when the robot starts to move as a collection starting point, so that the synchronism of the data collected by the laser tracker and the EtherCAT is ensured.
2.2 selection of data samples
The screening of the data not only ensures that intervals exist among the data, but also ensures that enough data samples exist, every 200 points in the experiment are selected as sample data, the final sample data is 480 points, and the sample data is represented by a set S:
S={x|x=Q(200k),k∈[1,480]} (1)
110 sample points on the PA trace, using the data set SPAAnd (4) showing. The test sample data is represented by set T:
T={x|x=SPA(2n),n∈[1,55]} (2)
the training samples are represented by data set E:
E=S-T (3)
3. prediction based on GA-RBF end position parameters
The invention adopts a terminal parameter prediction model based on a GA-RBF neural network to calculate the terminal parameters of the robot, and the terminal parameters of the robot comprise two parts: an end position parameter and an end velocity parameter. The RBF network-based end parameter prediction model acquisition process is shown in FIG. 5.
3.1 data samples
And selecting and analyzing according to sample data, taking 240 pairs of data as RBF network training samples, namely taking the positions of six axis joints acquired by an EtherCAT real-time data acquisition bus as input, and correspondingly, acquiring the tail end position by a laser tracker as output to form tail end position parameter training sample data.
3.2 normalization
In the experiment of the invention, in order to prevent the loss of some characteristic relations with low orders of magnitude, the original sample data must be standardized, and all data are converted into a [0,1] interval, namely, the normalization processing is carried out. The normalization method of the sample data in the experiment is realized by a linear transfer function, as shown in the formula:
in the formula: x'kIs a normalized conversionInput value, x, of the post-networkkIs the original sample data, xmax、xminRespectively the maximum and minimum values in the original sample data.
3.3GA optimized RBF networks
3.3.1 initialization parameter settings
Before genetic algorithm optimization, relevant initialization parameters in a program need to be set. The parameters of the genetic algorithm are adjusted by experience and continuous simulation experiments to determine appropriate values. The genetic initialization parameters are set as in table 1:
TABLE 1 genetic initialization parameter settings
3.3.2 initial population and chromosome coding
First, according to the general formula of the number of hidden layer nodes:
(m is the number of nodes of the output layer, and n is the number of nodes of the input layer) the structure of the network is determined. In the process of building a prediction model based on the end position parameters of the RBF network, the pulse of the six-freedom-degree axial joint is used as an input, so that an input node n is set to be 6, the end position is a three-dimensional space position, so that an output node m is set to be 3, and a is set to be [1,10 & lt/EN & gt ]]Within the range, for rounding, if a is 3, h is 6. The network is a 6-6-3 structure, and then the RBF center vector is inherited 6 multiplied by 6, the basis function width vector is inherited 6 multiplied by 1, and the weight vector is inherited 6 multiplied by 3.
3.3.3GA optimization program
The algorithm searches for the optimal individual by continuously calculating the fitness value of the individual, executes genetic operator operation, and continuously updates the initial parameters of the RBF network to obtain the optimized network.
And in the genetic algorithm optimizing process, the evolution times are increased, the errors are reduced, when the evolution times reach 20 times, the errors are below 0.02, the errors of the individuals are sorted, and the reciprocal is taken as the optimal fitness value.
Optimizing RBF network parameters by adopting a genetic algorithm to obtain a most adaptive basis function width vector B meeting the precision requirementpCenter vector CpAnd a weight vector Wp。
3.4 test specimens
As a verification for the established RBF model, at least 50 groups of training data can be selected from the previously acquired training data, and at least 50 groups of data can be tested additionally to be used as test data samples.
3.5 reverse normalization
Test sample data is substituted into a trained terminal data prediction model based on the RBF network, and because output prediction results are normalized values and are not output actual values, in order to perform precision analysis on the predicted output of the RBF model, the output needs to be subjected to inverse normalization.
3.6 model validation
And normalizing to obtain the terminal data of the predicted robot, comparing the terminal data of the predicted robot with the terminal data of the actual robot to confirm the feasibility of the model, and retraining the RBF network according to the steps 3.1-3.5 when the deviation between the predicted data and the actual measured data is large.
4. Prediction of network terminal speed parameter based on GA-RBF
The establishment of the terminal speed prediction model based on the GA-RBF network is quite similar to that of the terminal position model. The network establishment procedure for end velocity prediction and the initial parameters of the genetic algorithm refer to the network for end position prediction, except that the RBF network structure becomes 6-6-1 since the output layer has only one node.
Robot fault diagnosis of GA-RBF neural network
The present invention is only discussed briefly to classify a single fault type. The robot is a huge system, such as a control system, a detection system, an execution system and a pneumatic system, and a plurality of parts exist under each system. Since the number of parts is large and complicated, the types of failures are also large, and a common failure of an industrial robot is shown in fig. 6.
A large amount of data of common faults of the robot are utilized, sample data of the faults are obtained after the data are screened and classified, and a general fault model of the robot based on the RBF neural network is trained, so that the fault type of the robot is judged for the robot with unqualified terminal performance indexes. The diagnostic procedure is shown in fig. 7.
After the type of the fault is set and the vector mapping between the fault and the output is good, the GA-RBF fault diagnosis is realized in a similar way to the prediction process of the end data. The method selects feedback data of each axis servo as a monitoring variable, screens a large amount of fault data from a fault database tested by a robot as sample data, sets five types of fault state data according to fault types to form five state models, and takes the deviation between a fault servo pulse and a normal operation pulse as the input of the RBF network. And 5 fault data of the robot are selected, wherein the fault data comprise waist faults, large arm faults, elbow faults, small arm faults and wrist faults, and 10 groups of data of each fault are selected, so that 50 groups of training samples are total.
When the failure neural network is designed, the diagnosis parameters are initialized to be consistent with the previous parameters, but the output dimension is changed, so that the initial value of the network structure is set to be m-5, a-2.68, the network structure of 6-6-5 is obtained, the number of central variables is 36, the width parameters are still 6, and the number of chromosomes is also unchanged. Further, the error of the target is set to 0.0001.
Comparing the tested and expected outputs, the result of the RBF diagnosis is very close to the expected output, and basically completely consistent, and the error is only 0.0023. By selecting a large amount of test sample data, the accuracy of fault classification is about 99.585%, and therefore the conclusion that the self-adaptive GA-RBF can meet the requirement for fault diagnosis of the robot body can be drawn.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.