Be used to the container mechanical property prediction method based on particle group optimizing BP neural network
Technical field
The present invention relates to a kind of container mechanical property prediction method of being used to, refer in particular to be based on particle group optimizing BP neural network be used to the container mechanical property prediction method.
Background technology
Be used to container since being suggested, be one of focus of mechanical vibration isolation area research always, and The experimental results shows is used to the anti-vibration performance that container can improve vibrating isolation system.Yet these research major parts are that to be used to container ideal linearity mathematical model be prerequisite, have ignored and have been used to the non-linear factor that exists in the container practical structures.Find that by actual tests non-linear factor has remarkable influence to the mechanical property of being used to container, and influence mechanism is complicated and changeable, often can only describe qualitatively it, is difficult to fundamentally grasp and is used to the container dynamic behaviour under the actual condition.Artificial neural network is based on the network model that biological neural network grows up, and has the advantage of handling strong nonlinearity, and therefore, the present invention considers to set up and is used to container adaptive neural network model, is used to the mechanical properties prediction of container.
The BP neural network has self-organization, self study and adaptive ability, principle simply is easy to realize, be used widely in various fields, but it adopts the gradient descent method that weights and the threshold value of network are revised in learning process, shortcomings such as existing and be absorbed in local optimum easily, speed of convergence is slow and generalization ability is weak.
Particle cluster algorithm is a kind of random optimization algorithm based on colony intelligence, its fast convergence rate, ability of searching optimum are strong, and need be by the characteristic information of problem itself, avoided requiring in the gradient descent method process of gradient, also avoid the selection in the genetic algorithm, intersection, variation etc. to evolve and operated, shortened the training time of neural network.There are some researches show, utilize particle cluster algorithm that the training process of BP networks is optimized, can improve the extensive performance of neural network, improve the precision of prediction of network.
Summary of the invention
The objective of the invention is to propose a kind of based on particle group optimizing BP neural network be used to the container mechanical property prediction method, realize being used to the good predict of container mechanical property.
The technical solution adopted in the present invention is:
Based on particle group optimizing BP neural network be used to the container mechanical property prediction method, comprise the steps:
(1) is used to the mechanical property test of container, by the flywheel of the different quality of packing into, obtains and be used to container and be used to hold mechanical response under coefficient and the input of different excitings in difference;
(2) obtain the test figure relevant with being used to the container mechanical property according to test findings, and set up and to be used to container mechanical properties prediction model based on the BP neural network;
(3) weights of BP network and threshold value are defined as a particle in the population search volume, and the correlation parameter of algorithm is carried out initialization;
(4) based on particle swarm optimization algorithm particle is carried out the iteration optimizing, determine optimum individual according to termination condition, and with its weights and threshold value as the BP network;
(5) the BP network that utilizes process to optimize is predicted the mechanical property of being used to container.
Described exciting is input as the sinusoidal period input, and different frequencies and corresponding amplitude are adopted in each input.
The described container mechanical properties prediction model of being used to is three layers of BP network, wherein the neuron number of input layer, hidden layer, output layer is respectively 4,5,1, the transport function of described hidden layer neuron is tanh S type function, and the neuronic transport function of output layer is linear transfer function.
Being used to being input as of container mechanical properties prediction model is used to hold coefficient and is used to displacement, speed and the acceleration of container under a plurality of transient time points, be output as the power output of being used to container, described displacement of being used to container is to preserve directly in real time by actuating vibration table to obtain, on this basis the displacement input is carried out curve fitting, then curvilinear equation is carried out the difference differentiate, just can obtain described speed and the acceleration of being used to container.
Described a plurality of transient time point refers to the sampled point of test figure, because exciting is input as the cycle input, in order to raise the efficiency, the duration of will sampling is decided to be two cycles, sample frequency under each cycle is 12Hz, and therefore, it is 24 that every kind of transient time of testing under the operating mode counts.
Termination condition in the described step (4) satisfies the least error requirement for reaching iterations or network error; Described network error computation process comprises the steps: that (1) give BP network with network weight and the threshold value of particle correspondence; (2) calculate each training sample according to the output valve of BP network forward direction, by comparing with expectation value, draw the error of each training sample; (3) calculate the error mean square root of all training samples, namely get network error.
The present invention can predict that its beneficial effect is effectively to the mechanical property of similar mechanical organ:
1. on the basis of being used to the container mechanical property test, obtain being used to the influential reference data of container power output, the gained data are reliably reasonable, guaranteed the training quality of network.
At reference data set up based on the BP neural network be used to container mechanical properties prediction model, and be optimized with the training process of particle swarm optimization algorithm to the BP network, improved the precision of prediction of network, realized being used to the good predict of container mechanical property.
Description of drawings
Fig. 1 is the overview flow chart of being used to the container mechanical property prediction method based on particle group optimizing BP neural network;
Fig. 2 is for being used to the chamber test arrangenent diagram in the embodiment;
Fig. 3 is for being used to container mechanical properties prediction model structure figure;
Fig. 4 is predicated error comparison diagram before and after the network optimization.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments.
Of the present invention based on particle group optimizing BP neural network be used to the container mechanical property prediction method, overall procedure specifically comprises the steps: as shown in Figure 1
(1) is used to the mechanical property test of container.
The subjects that adopts among the embodiment is that ball screw type is used to container, be used to container and adopt three kinds of flywheels that vary in size, be used to hold coefficient accordingly and be respectively 30kg, 130kg and 332kg, testing equipment is numerical control hydraulic servo vibration exciting testing table, test is arranged as shown in Figure 2, this testing table can support exciting head 1 according to certain displacement request motion, and displacement and the load signal of real-time monitored and preservation exciting head.To be used to the upper end of container 3 fixes by latch 4, the lower end of being used to container 3 links to each other with exciting head 1 by latch 2, sinusoidal input is adopted in test, the correlation parameter of exciting input is as shown in table 1, in order to prevent that test force from exceeding the load of actuating vibration table, when dither, adopted less amplitude, obtained 51 kinds of container 3 mechanical properties of being used to of testing under the operating mode by test and responded.
The correlation parameter of table 1 exciting input
(2) obtain the test figure relevant with being used to container 3 mechanical properties.
The parameter that container 3 mechanical properties are used in influence also comprises displacement, speed and the acceleration of being used to container 3 except being used to hold the coefficient, wherein be used to the displacement of container 3 and can preserve directly acquisition in real time by actuating vibration table, in order to obtain to be used to speed and the acceleration of container 3, displacement input carries out curve fitting by Matlab curve match tool box CFTOOL, then curvilinear equation is carried out the difference differentiate, just can obtain to be used to speed and the acceleration of container 3.
(3) set up and to be used to container 3 mechanical properties prediction models based on the BP neural network.
Being input as of model is used to hold coefficient and is used to displacement, speed and the acceleration of container 3 under a plurality of transient time points, be output as and be used to the container power output under corresponding transient time point, obtaining of transient time point is by test figure is sampled, sampling period is two cycles, sample frequency under each cycle is 12Hz, therefore to count be 24 the transient time under every kind of test operating mode, and the final data that obtain to be used for network training and test have 51 * 24=1224 group.Because model has 4 inputs, 1 output, therefore the structure of determining network is 4-5-1, the neuron number that is input layer, hidden layer, output layer is respectively 4,5,1, as Fig. 3, the transport function of hidden layer neuron is tanh S type function, and the neuronic transport function of output layer is linear transfer function.
(4) be optimized based on the training process of particle swarm optimization algorithm to the BP network.
According to topology of networks, the number summation that obtains network weight and threshold value is 4 * 5+5 * 1+5 * 1+1=31, simultaneously the weights of network and threshold value is defined as a particle in the population search volume, and the dimension of particle is 31.Population number, velocity range, inertia weight w, acceleration parameter r to particle
1And r
2Carry out initialization, maximum iteration time is decided to be 300, least error requires to be decided to be 0.1.
Based on particle swarm optimization algorithm particle is carried out the iteration optimizing, idiographic flow is as follows:
1. produce all particle position x and speed v at random;
2. import a particle, calculating its fitness is above-mentioned network error;
3. continue other particles of input, calculate the fitness of all particles;
4. determine self desired positions P of particle
tAnd the fitness pbest under this position and overall desired positions G
tAnd the fitness gbest under this position;
5. upgrade all particle's velocity and position according to following formula;
In the formula, be that interval [0,1] goes up equally distributed random number rand();
6. judge whether particle's velocity surpasses maximal rate, if surpass, speed is updated to maximal rate, whether judges particle's velocity less than minimum speed, if less than, speed is updated to minimum speed, other situation speed are normally upgraded;
7. recomputate the particle fitness after the renewal, and upgrade P
tWith pbest and G
tAnd gbest, if the fitness<pbest of current particle, upgrading pbest is the fitness of current particle, corresponding particle position is self desired positions P
t, otherwise P
tConstant with pbest; If the fitness<gbest of current particle, upgrading gbest is the fitness of current particle, and corresponding particle position is overall desired positions G
t, otherwise G
tConstant with gbest;
8. continue the next round iteration, until satisfying termination condition.
(5) utilize the mechanical property of being used to container through the network prediction of optimizing.
By obtaining final optimum individual after the above-mentioned iteration optimizing, and give BP network with individual corresponding network weight and threshold value, thereby obtain through being used to container mechanical properties prediction model after optimizing.Network 1100 groups of data of picked at random in 1224 groups of data are used for the optimizing process of step (4), remaining 124 groups of model prediction precision that are used for after check is optimized.The predicated error of network is to such as Fig. 4 before and after optimizing, can obviously find out through the network estimated performance after optimizing from Fig. 4 and to be better than without the network of optimizing, be 10.4 by the network predicated error root-mean-square value that calculates after the optimization, network predicated error root-mean-square value without optimization is 19.1, the result shows, has reduced by 45.5% through optimizing back network predicated error.
Above result shows, that adopts that the inventive method sets up is used to container mechanical properties prediction model and can predicts well the mechanical property of being used to container, and precision of prediction had increased significantly before optimizing, the estimated performance of network is improved, for the mechanical properties prediction of being used to container and similar mechanical organ provides effective method.