CN116579245A - Grain density prediction method and device - Google Patents

Grain density prediction method and device Download PDF

Info

Publication number
CN116579245A
CN116579245A CN202310552589.5A CN202310552589A CN116579245A CN 116579245 A CN116579245 A CN 116579245A CN 202310552589 A CN202310552589 A CN 202310552589A CN 116579245 A CN116579245 A CN 116579245A
Authority
CN
China
Prior art keywords
particle
improved
model
max
parameter set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310552589.5A
Other languages
Chinese (zh)
Other versions
CN116579245B (en
Inventor
伍凌川
郭进勇
李昂
杨治林
余瑶
李全俊
石义官
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China South Industries Group Automation Research Institute
Original Assignee
China South Industries Group Automation Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China South Industries Group Automation Research Institute filed Critical China South Industries Group Automation Research Institute
Priority to CN202310552589.5A priority Critical patent/CN116579245B/en
Publication of CN116579245A publication Critical patent/CN116579245A/en
Application granted granted Critical
Publication of CN116579245B publication Critical patent/CN116579245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Geometry (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a grain density prediction method and device, which are characterized in that optimization parameters are rapidly solved by adaptively modifying internal inertia weights of a PSO algorithm, and parameter optimal values are input into an RBF model, so that the improved effect of the model is achieved, the improved PSO-RBF model not only has higher prediction precision, but also has higher model stability, has practical significance for the grain density prediction of explosives, and provides a method and thinking for subsequent quality detection and process parameter adjustment.

Description

Grain density prediction method and device
Technical Field
The application relates to the technical field of shaped charge quality prediction, in particular to a grain density prediction method and device based on a PSO-RBF network model.
Background
Along with the wide application of finite element simulation and artificial intelligence technology in different fields, numerical simulation of the explosive compression molding process by using a simulation method becomes possible, so that the research and development cost and period are reduced, the rapid research and development of a charging process are realized, and simultaneously, the simulation result is combined with algorithms such as a neural network and the like, so that the prediction of the molding charging quality can be realized. Therefore, the method has important significance for optimizing and predicting the charging process and solving the problems of lagging charging manufacturing process, poor density uniformity, long development period and the like. Neural networks with RBF (Radial Basis Function) as an activation function are widely used in shaped charge quality prediction.
Since the initial parameters of the RBF network are randomly generated based on data characteristics or computationally generated based on clustering algorithms, the generated parameters are not optimal parameters. Therefore, the density prediction using the RBF model directly may not achieve the training accuracy. In such a case, a particle swarm optimization (Particle Swarm Optimization, PSO) algorithm is adopted, and the idea of the particle swarm algorithm is derived from research on the foraging behavior of the bird swarm, which enables the swarm to find an optimal destination through collective information sharing. Each bird in the flock searches around the bird that is currently closest to the feed. Each particle in the particle swarm can be a potential solution, the characteristics of the particle are generally represented by three indexes of speed, displacement and fitness value, the speed expression of the particle controls the movement direction and movement distance of the particle, and the speed can be changed through parameters such as inertia weight, learning factor and the like. The particles update their own locations in space by searching for individual optima (extremums) and global optima (extremums). Along with the increase of the iteration times, the particle swarm continuously updates the position of the particle swarm, approaches to the global optimum, and finally obtains the optimum solution of the problem by comparing the fitness. And the PSO algorithm is used for searching the optimal initial parameters of the network, so that the reliability and stability of network prediction are improved.
However, the particle swarm optimization algorithm also faces the problems that the searching step length is too long near the optimal solution, so that particles cannot always converge towards the optimal solution direction, swing above the optimal solution and have low convergence speed because the searching step length is not reasonably adjusted and still is according to default inertia weight.
Disclosure of Invention
In view of the above, the present application provides a grain density prediction method and apparatus for overcoming, or at least partially solving, the above-described problems.
The application provides the following scheme:
a method of grain density prediction comprising:
acquiring an input parameter set, wherein the input parameter set comprises a plurality of explosive pressing process parameters;
inputting the input parameter set into a target prediction model after training is completed, so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
Preferably: the improved inertial weight is represented by the following formula:
wherein b is a damping factor, a constant with a value of 0-1, T is the maximum iteration number, w max To preset the maximum inertia weight, k t Is a dynamic dispersion of the population.
Preferably: normalizing a plurality of explosive pressing process parameters to obtain the input parameter set; the normalization process is represented by the following formula:
wherein x is a sample parameter, x min And x max Respectively the minimum value and the maximum value of experimental data, y max Is 1, y min Is-1.
Preferably: the training of the target prediction model comprises the following steps:
acquiring a training parameter set and determining an RBF network structure;
initializing a PSO algorithm, initializing a particle swarm, selecting the number of particles as m, initializing the iteration number as t, and randomly generating the initial speed of each particle as v i The position of the particle group is x i The individual optimum value of each particle is p i
Calculating the current fitness f (epsilon) of each particle i );
Updating the inertia weight w by adopting the nonlinear dynamic self-adaptive method;
updating particle velocity and position;
and finding out optimal particles, taking the optimal particles as a network output result, and storing model parameters to obtain the target prediction model.
Preferably: acquiring a test parameter set, and inputting the test parameter set into the target prediction model to obtain test result data; the accuracy of the target prediction model is evaluated using the following equation:
wherein: testOUT is test result data, true is acquired real data, k is the number of test sample groups, and the maximum is n.
Preferably: the RBF network structure determines the hidden layer node number through the following formula:
wherein: n is the number of hidden layer nodes, m is the number of input layer nodes, p is the number of output layer nodes, and d is a preset constant.
Preferably: the RBF network structure adopts a Gaussian functionAs excitation functions, a, b, c are all preset real constants, and a > 0.
Preferably: the current fitness f (epsilon) i ) Obtained by calculation of the formula:
wherein: f (epsilon) i ) For the fitness of the ith particle, y k For the predicted value of the ith particle at the kth sample,for the actual value of the ith particle at the kth sample, N is the sample size.
Preferably: the particle velocity and position are updated by:
v ij (t+1)=w·v ij (t)+c 1 r 1 (t)[p ij (t)-x ij (t)]+c 2 r 2 (t)[p gi (t)-x ij (t)]
x ij (t+1)=x ij (t)+v ij (t+1)
wherein: j=1, 2, …, d, j is the particle dimension; r is (r) 1 、r 2 Are all [0,1 ]]Random numbers in between; c 1 ,c 2 All are preset acceleration factors, and c 1 =c 2 =1.4995; w is a preset inertial weight, v ij ∈[v min ,v max ],v max Is a preset maximum speed; v min A preset minimum speed; t is E [0, T max ],T max The method comprises the steps of setting the maximum iteration times in advance; the speed adjustment rule is as follows:
wherein: v i For the current particle velocity, v max Maximum speed for particles; v mi n is the minimum particle velocity.
A grain density prediction apparatus comprising:
the input parameter set acquisition unit is used for acquiring an input parameter set, wherein the input parameter set comprises a plurality of explosive pressing process parameters;
the grain density prediction result output unit is used for inputting the input parameter set into the target prediction model after training is completed so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
According to the specific embodiment provided by the application, the application discloses the following technical effects:
according to the grain density prediction method and device provided by the embodiment of the application, the optimization parameters are rapidly solved through self-adaptive modification of the internal inertia weight of the PSO algorithm, and the parameter optimal values are input into the RBF model, so that the model improvement effect is achieved, the improved PSO-RBF model not only has higher prediction precision, but also has higher model stability, has practical significance for the grain density prediction of the explosive, and provides a method and thinking for subsequent quality detection and process parameter adjustment.
Of course, it is not necessary for any one product to practice the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments will be briefly described below. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings by those of ordinary skill in the art without inventive effort.
FIG. 1 is a flow chart of a method for predicting grain density provided by an embodiment of the present application;
FIG. 2 is a flowchart for creating a target prediction model according to an embodiment of the present application;
FIG. 3 is a flow chart of improved PSO optimization provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an RBF neural network according to an embodiment of the present application;
FIG. 5 is a schematic diagram showing the prediction contrast of RBF neural network results according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an RBF neural network prediction error condition according to an embodiment of the present application;
FIG. 7 is a schematic diagram showing a comparison of prediction cases of an IPSO-RBF neural network according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an IPSO-RBF neural network prediction error condition provided by an embodiment of the present application;
FIG. 9 is a schematic diagram showing a comparison of prediction conditions of a PSO-RBF neural network according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a PSO-RBF neural network prediction error condition provided by an embodiment of the present application;
FIG. 11 is a diagram illustrating iterative optimization comparison between a nonlinear adaptive inertial weight method and a default inertial weight method according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a grain density prediction apparatus according to an embodiment of the present application;
fig. 13 is a schematic view of a grain density prediction apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the application, fall within the scope of protection of the application.
Referring to fig. 1, a method for predicting a grain density according to an embodiment of the present application, as shown in fig. 1, may include:
s101: acquiring an input parameter set, wherein the input parameter set comprises a plurality of explosive pressing process parameters;
s102: inputting the input parameter set into a target prediction model after training is completed, so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
According to the explosive grain density prediction method provided by the embodiment of the application, the inertia weight w in the PSO algorithm is improved to obtain the improved inertia weight Iw, the inertia weight Iw is embedded into the PSO algorithm to obtain the PSO-RBF network after PSO improvement, and the explosive grain density is predicted by using the PSO-RBF network model. Establishing a prediction model of explosive pressing process parameters and explosive column density, predicting the explosive column pressing forming density, and providing a method and an idea for subsequent quality detection and process parameter adjustment
Further, the improved inertial weight is represented by the following formula:
wherein b is a damping factor, a constant with a value of 0-1, and T is the maximum iteration timeNumber, w max To preset the maximum inertia weight, k t Is a dynamic dispersion of the population.
Further, normalizing a plurality of explosive pressing process parameters to obtain the input parameter set; the normalization process is represented by the following formula:
wherein x is a sample parameter, x min And x max Respectively the minimum value and the maximum value of experimental data, y max Is 1, y min Is-1.
After the improved inertia weight is determined, the prediction model needs to be trained, and various parameters of the prediction model are determined. To this end, the embodiment of the present application may further provide training of the target prediction model including:
acquiring a training parameter set and determining an RBF network structure;
initializing a PSO algorithm, initializing a particle swarm, selecting the number of particles as m, initializing the iteration number as t, and randomly generating the initial speed of each particle as v i The position of the particle group is x i The individual optimum value for each particle is pi;
calculating the current fitness f (epsilon) of each particle i );
Updating the inertia weight w by adopting the nonlinear dynamic self-adaptive method;
updating particle velocity and position;
and finding out optimal particles, taking the optimal particles as a network output result, and storing model parameters to obtain the target prediction model.
In order to test the precision of the target prediction model after training, the embodiment of the application can also provide the steps of acquiring a test parameter set, and inputting the test parameter set into the target prediction model to obtain test result data; the accuracy of the target prediction model is evaluated using the following equation:
wherein: testOUT is test result data, true is acquired real data, k is the number of test sample groups, and the maximum is n.
Further, the RBF network structure determines the hidden layer node number by the following formula:
wherein: n is the number of hidden layer nodes, m is the number of input layer nodes, p is the number of output layer nodes, and d is a preset constant.
The RBF network structure adopts a Gaussian functionAs excitation functions, a, b, c are all preset real constants, and a > 0.
The current fitness f (epsilon) i ) Obtained by calculation of the formula:
wherein: f (epsilon) i ) For the fitness of the ith particle, y k For the predicted value of the ith particle at the kth sample,for the actual value of the ith particle at the kth sample, N is the sample size.
The particle velocity and position are updated by:
v ij (t+1)=w·v ij (t)+c 1 r 1 (t)[p ij (t)-x ij (t)]+c 2 r 2 (t)[p gi (t)-x ij (t)]
x ij (t+1)=x ij (t)+v ij (t+1)
wherein: j=1, 2, …, d, j is the particle dimension; r is (r) 1 、r 2 Are all [0,1 ]]Random numbers in between; c 1 ,c 2 All are preset acceleration factors, and c 1 =c 2 =1.4995; w is a preset inertial weight, v ij ∈[v min ,v max ],v max Is a preset maximum speed; v min A preset minimum speed; t is E [0, T max ],T max The method comprises the steps of setting the maximum iteration times in advance; the speed adjustment rule is as follows:
wherein: v i For the current particle velocity, v max Maximum speed for particles; v min Is the minimum velocity of the particles.
The method for predicting the density of the grain provided by the embodiment of the application is described in detail below.
The method provided by the embodiment of the application mainly aims at improving the inertia weight w in the PSO_RBF algorithm, and embedding the improved inertia weight Iw into the PSO so as to realize improvement of a PSO_RBF model. The PSO algorithm obtained after improvement improves the training convergence speed of the PSO optimization algorithm and reduces the training time. The accuracy of the center vector, the base width vector and the network weight of the particle swarm optimization radial basis function is improved, the prediction error is reduced, and an accurate explosive column density prediction model is established.
1. The inertia weight w improvement method comprises the following steps:
combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight w in the PSO algorithm to obtain an improved inertia weight Iw.
The inertia weight w is the influence of the speed of the previous generation of particles on the speed of the current generation of particles, or the trust degree of the particles on the current self-motion state, and the particles perform inertia motion according to the self-speed;
the sigmoid function refers toNonlinear function of neurons.
An inertial weight improvement method comprising the steps of:
s11, calculating population dynamic dispersion:
f (ε) t ) For the t-th generation of particle fitness, f (ε) t-1 ) The particle fitness of the t-1 generation is that the dispersion of the first generation particles is 1;
s12, calculating a nonlinear dynamic self-adaptive inertia weight factor w: combining the dispersion with a sigmoid function to obtain a nonlinear dynamic adaptive inertia weight formula:
wherein b is a damping factor, a constant of 0-1, T is the maximum number of iterations, w max The maximum inertia weight is preset.
PSO improvement method:
embedding Iw into a PSO algorithm to obtain improved PSO, finding out optimal parameters of an RBF network model by using the improved PSO algorithm, and establishing a PSO-RBF network model for predicting the density of explosive columns;
the PSO algorithm is an optimization algorithm for iterative optimization, namely a particle swarm algorithm (Particle Swarm Optimization);
embedding Iw into PSO algorithm, namely writing the improved inertial weight Iw into a program module by utilizing MATLAB software, and adding the program module into PSO to replace default inertial weight;
the RBF is a scalar function of some radial symmetry, typically defined as a monotonic function of the radial distance (typically euclidean distance) between the sample and the data center;
the parameter is the center vector c h Base width vector sigma h Network weight w;
the PSO-RBF neural network refers to finding out the optimal parameter of RBF by using PSO, thereby realizing an improved model PSO-RBF neural network;
3. the explosive grain density prediction method comprises the following steps:
normalizing the training set, inputting the training set to train the PSO-RBF network model to obtain an optimized model, and testing the testing set to output and predict the density of explosive columns;
the normalization refers to the use of the function:
normalizing the sample, wherein x is a sample parameter, and min and x max Respectively the minimum value and the maximum value of experimental data, y max Is 1, y min Is-1;
the explosive column density refers to the ratio of the weight of the formed explosive to the volume occupied by the formed explosive after the explosive is pressed and molded, and is called as the explosive column density;
as shown in fig. 2 and 3, the explosive grain density prediction method comprises the following steps:
s31, carrying out normalization processing on an input sample, and dividing the sample into a training set and a testing set;
s32, training the PSO-RBF network by using a training set to obtain network parameters;
s33, loading network model parameters, and predicting RBF by using a test set;
training the PSO-RBF network by using a training set to obtain a network model, comprising the following steps:
s3201, inputting a training set, wherein the training set comprises 18 groups of data;
s3202, constructing an RBF network structure; the input layer is 6 nodes and is a single output result, so that the number of neurons of the hidden layer is determined to be 2, the structural diagram of the RBF function is shown in fig. 4, the network model structural parameters of RBF are optimized by using a particle swarm algorithm, in essence, particles in the particle swarm are mapped by the RBF neural network parameters which are required to be optimized, the dimension of the particles is equal to the sum of the parameters which are required to be optimized, the input layer to the hidden layer of the RBF neural network is obtained by mapping a Gaussian kernel function, and the function form is as follows:
the parameters of the particle swarm optimization RBF function mainly comprise a center vector c h Base width vector sigma h Network weight w.
The RBF network structure adopts the following formula to determine the hidden layer node number
Wherein n is the number of hidden layer nodes, m is the number of input layer nodes, p is the number of output layer nodes, and d is a preset constant; using Gaussian functionsAs RBF network excitation functions, a, b, c are all preset real constants, and a > 0.
The initialization PSO is further set, parameters to be optimized (center vector, base width vector and network weight) of the RBF neural network are encoded into real digital strings to represent individual particles, and meanwhile, a certain-scale particle composition initialization particle swarm is randomly generated. Since the output node is 1, the number of data width and weight coefficient of the function is the same as the number of hidden layer neurons, the number of input layer nodes is intnum, the number of hidden layer nodes is hidnum, each input node needs to be excited once with all hidden layer neurons, so the number of data center parameters is hidnum, the number of particle dimensions is: lnun=2×hidnum+hidnum×intnum.
Further setting a PSO-RBF neural network, initializing a particle swarm, and determining the particle count and the iteration number; and inputting a training sample, calculating the current fitness of the particles according to a fitness function, comparing the current fitness with the last one to obtain an optimal fitness value, and updating the current optimal position of the particles according to a comparison result.
S3203, initializing a PSO algorithm and initializing a particle swarm: selecting the number of particles as m, initializing the iteration number as t, and randomly generating the initial speed of each particle as v i The position of the particle group is x i The individual optimum value of each particle is p i The method comprises the steps of carrying out a first treatment on the surface of the i is an integer of 1 or more and m or less, the initial position and velocity are equal in number and the range is (-1, 1), so c h Sum sigma h The corresponding position parameter initialization ranges are between (0, 1), while the position parameter initialization ranges corresponding to w are set between (-1, 1), and the speed ranges are between (-1, 1). Further setting the calculation fitness, and the function formula is as follows:
wherein f (ε) i ) For the fitness of the ith particle, y k For the predicted value of the ith particle at the kth sample,for the actual value of the ith particle at the kth sample, N is the sample size.
For m different p i Values, respectively training m RBF neural network parameters and structures; clustering output data according to different clustering radiuses by adopting a K-means clustering algorithm respectively to obtain the clustering number and hidden layer center vector of the RBF neural network; and training the RBF neural network according to the basis function width calculation process and the least square method to obtain the predicted output y of the RBF neural network, wherein the number of training times is reached.
S3204, calculating the current fitness f (ε) of each particle i );
S3205, updating the inertia weight w according to the nonlinear self-adaption method;
s3206, updating particle speed and position; the particle velocity and position are updated by:
v ij (t+1)=w·v ij (t)+c 1 r 1 (t)[p ij (t)-x ij (t)]+c 2 r 2 (t)[p gi (t)-x ij (t)]
x ij (t+1)=x ij (t)+v ij (t+1)
wherein: j=1, 2, …, d, j is the particle dimension; r is (r) 1 、r 2 Are all [0,1 ]]Random numbers in between; c 1 ,c 2 All are preset acceleration factors, and c 1 =c 2 =1.4995; w is a preset inertial weight, v ij ∈[v min ,v max ],v max Is a preset maximum speed; v min A preset minimum speed; t is E [0, T max ],T max The method comprises the steps of setting the maximum iteration times in advance; the speed adjustment rule is as follows:
wherein: v i For the current particle velocity, v max Maximum speed for particles; v mi n is the minimum particle velocity.
S3207, finding out optimal particles, and storing model parameters as a network output result. Comparing the current fitness with the historical best position fitness for each particle if f (ε) i )<f(ε bi ) Then p (b) i )=p(ε i ) The method comprises the steps of carrying out a first treatment on the surface of the If f (ε) i )<f(ε gb ) Then p (gb) =p (b) i );ε i Represents the position of the ith particle, f (ε) i ) For the current fitness of the ith particle, p (b i ) F (ε) is the position where the i-th particle fitness is smallest bi ) For the most historic position fitness of the ith particle, p (gb) is the position of the lowest fitness in the first i particles, f (ε) gb ) The best historical position fitness among the first i particles.
S3208, if optimizing reaches the maximum iteration number, ending, returning the global extremum gb of the current group to be the optimal value, and jumping to execute S3209; otherwise t=t+1, the jump performs S3205.
S3209, outputting an optimizing result.
The nonlinear dynamic adaptive inertia weight can meet the requirement of iteration earlier stage, larger inertia weight and update speed, improve optimizing speed, and control particles to quickly search in a global optimal direction in a larger step length; along with the increase of the iteration times, the self-adaptability of the inertia weight is reduced, the updating speed is reduced, and the particles are controlled to quickly converge around the global optimum in smaller step length, so that the local extremum is prevented from being skipped.
Along with the updating of the particle parameters, comparing the fitness of the current particles with the non-optimized fitness, and updating assignment if the fitness is smaller than the individual optimization; and simultaneously carrying out global optimal comparison, if the current fitness is smaller than the global optimal fitness, updating and assigning the global optimal degree of freedom, storing the current particle position, assigning the current particle position to the parameter of the RBF function, judging whether the current iteration number is the maximum iteration number, and if not, continuing to carry out iterative updating, finding out the optimal parameter, and completing the optimization process of the parameter.
Loading model parameters, and predicting the test set by using PSO-RBF comprises the following steps:
s3301, loading trained model parameters into an improved PSO network; and (3) introducing the optimizing output result into the RBF neural network to obtain the optimized RBF neural network.
S3302, loading the test set into the improved RBF network to predict the density of explosive columns; and inputting 4 groups of samples in the test set into the optimization model to obtain the explosive column density prediction result.
S3303, according to the formulaAnd evaluating the precision of the network model, wherein testOUT is predicted result data, true is acquired real data, k is the number of test sample groups, and the maximum is n.
And finally, comparing the improved PSO_RBF with the RBF which is not optimized, wherein the prediction mean square error of the PSO_RBF is 3.7967 multiplied by 10 < -4 >, the prediction mean square error of the RBF is 9.0141 multiplied by 10 < -4 >, and the optimized model prediction effect is far more ideal than the RBF effect. The comparison results of the two are shown in fig. 5 and 6.
The data set may be 22 sets of data sets comprising a material preheating temperature, a mold preheating temperature, a pressing pressure, a vacuum time, a dwell time, 6 input features of vacuum, and one output feature of finished product density.
Training and predicting results: from the prediction result, when the dimension of the particle swarm is set to be 24, the iteration number is set to be 100, the obtained training result is optimal, and when the iteration number is 22, the value of MSE tends to be stable, and the optimal fitness value is 0.3131.
The specific process is shown in fig. 7, 8, 9, 10 and 11, the iteration convergence of the PSO_RBF network model using nonlinear dynamic adaptive inertia weight is quicker, the mean square error 2.9863 x 10 < -4 > of the obtained final prediction data is smaller than the root mean square error 3.7967 x 10 < -4 > of the prediction data of default inertia weight, the accuracy of grain compression density prediction is greatly improved, and the accuracy of grain compression density prediction is reduced by 21.34%.
In a word, the grain density prediction method provided by the application has the advantages that through self-adaptive modification of the internal inertia weight of the PSO algorithm, the optimization parameters are rapidly solved, and the parameter optimal values are input into the RBF model, so that the model improvement effect is achieved, the improved PSO-RBF model not only has higher prediction precision, but also has higher model stability, has practical significance for the grain density prediction of the explosive, and provides a method and thinking for subsequent quality detection and process parameter adjustment.
Referring to fig. 12, an embodiment of the present application may also provide a grain density prediction apparatus, as shown in fig. 12, which may include:
an input parameter set obtaining unit 1201, configured to obtain an input parameter set, where the input parameter set includes a plurality of explosive pressing process parameters;
a grain density prediction result output unit 1202, configured to input the input parameter set into a target prediction model after training is completed, so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
As shown in fig. 13, a grain density prediction apparatus provided by an embodiment of the present application may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all complete communication with each other through a communication bus 13.
In an embodiment of the present application, the processor 10 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a field programmable gate array, or other programmable logic device, etc.
Processor 10 may invoke programs stored in memory 11 and, in particular, processor 10 may perform operations in embodiments of the grain density prediction method.
The memory 11 is used for storing one or more programs, and the programs may include program codes including computer operation instructions, and in the embodiment of the present application, at least the programs for implementing the following functions are stored in the memory 11:
acquiring an input parameter set, wherein the input parameter set comprises a plurality of explosive pressing process parameters;
inputting the input parameter set into a target prediction model after training is completed, so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
In one possible implementation, the memory 11 may include a storage program area and a storage data area, where the storage program area may store an operating system, and application programs required for at least one function (such as a file creation function, a data read-write function), and the like; the store data area may store data created during use, such as initialization data, etc.
In addition, the memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage device.
The communication interface 12 may be an interface of a communication module for interfacing with other devices or systems.
Of course, it should be noted that the structure shown in fig. 13 is not limited to the apparatus for predicting the density of a medicine column in the embodiment of the present application, and the apparatus for predicting the density of a medicine column may include more or less components than those shown in fig. 13 or may combine some components in practical application.
Embodiments of the present application may also provide a computer readable storage medium storing program code for performing the steps of the above-described grain density prediction method.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. A method of predicting grain density, comprising:
acquiring an input parameter set, wherein the input parameter set comprises a plurality of explosive pressing process parameters;
inputting the input parameter set into a target prediction model after training is completed, so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
2. The method of claim 1, wherein the improved inertial weight is represented by:
wherein b is a damping factor, a constant with a value of 0-1, T is the maximum iteration number, w max To preset the maximum inertia weight, k t Is a dynamic dispersion of the population.
3. The grain density prediction method according to claim 1, wherein the input parameter set is obtained by normalizing a plurality of the explosive pressing process parameters; the normalization process is represented by the following formula:
wherein x is a sample parameter, x min And x max Respectively the minimum value and the maximum value of experimental data, y max Is 1, y min Is-1.
4. The method of claim 1, wherein the training of the target prediction model comprises:
acquiring a training parameter set and determining an RBF network structure;
initializing a PSO algorithm, initializing a particle swarm, selecting the number of particles as m, initializing the iteration number as t, and randomly generating the initial speed of each particle as v i The position of the particle group is x i The individual optimum value of each particle is p i
Calculating the current fitness f (epsilon) of each particle i );
Updating the inertia weight w by adopting the nonlinear dynamic self-adaptive method;
updating particle velocity and position;
and finding out optimal particles, taking the optimal particles as a network output result, and storing model parameters to obtain the target prediction model.
5. The method of claim 4, wherein a set of test parameters is obtained, and the set of test parameters is input into the target prediction model to obtain test result data; the accuracy of the target prediction model is evaluated using the following equation:
wherein: testOUT is test result data, true data acquired by true, k is the number of test sample groups, and the maximum is n.
6. The grain density prediction method of claim 4, wherein the RBF network structure determines the hidden layer node number by the formula:
wherein: n is the number of hidden layer nodes, m is the number of input layer nodes, p is the number of output layer nodes, and d is a preset constant.
7. The method of claim 4, wherein the RBF network structure employs a gaussian functionAs excitation functions, a, b, c are all preset real constants, and a > 0.
8. The method of claim 4, wherein the current fitness f (ε) i ) Obtained by calculation of the formula:
wherein: f (epsilon) i ) For the fitness of the ith particle, y k For the predicted value of the ith particle at the kth sample,for the actual value of the ith particle at the kth sample, N is the sample size.
9. The method of claim 4, wherein the particle velocity and position are updated by:
v ij (t+1)=w·v ij (t)+c 1 r 1 (t)[p ij (t)-x ij (t)]+c 2 r 2 (t)[p gi (t)-x ij (t)]
x ij (t+1)=x ij (t)+v ij (t+1)
wherein: j=1, 2, …, d, j is the particle dimension; r is (r) 1 、r 2 Are all [0,1 ]]Random numbers in between; c 1 ,c 2 Are all presetConstant acceleration factor, and c 1 =c 2 =1.4995; w is a preset inertial weight, v ij ∈[v min ,v max ],v max Is a preset maximum speed; v min A preset minimum speed; t is E [0, T max ],T max The method comprises the steps of setting the maximum iteration times in advance; the speed adjustment rule is as follows:
wherein: v i For the current particle velocity, v max Maximum speed for particles; v mi n is the minimum particle velocity.
10. A grain density prediction apparatus, comprising:
the input parameter set acquisition unit is used for acquiring an input parameter set, wherein the input parameter set comprises a plurality of explosive pressing process parameters;
the grain density prediction result output unit is used for inputting the input parameter set into the target prediction model after training is completed so that the target prediction model outputs a grain density prediction result; the target prediction model comprises an RBF network model and an improved PSO algorithm, the improved PSO algorithm is used for finding out the optimal parameters of the RBF network model, and the improved PSO algorithm comprises an improved inertia weight;
the improved inertial weight is obtained by:
and combining the dynamic dispersion with a sigmoid function to obtain a nonlinear dynamic self-adaptive method, and improving the inertia weight in the PSO algorithm to obtain the improved inertia weight.
CN202310552589.5A 2023-05-16 2023-05-16 Grain density prediction method and device Active CN116579245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310552589.5A CN116579245B (en) 2023-05-16 2023-05-16 Grain density prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310552589.5A CN116579245B (en) 2023-05-16 2023-05-16 Grain density prediction method and device

Publications (2)

Publication Number Publication Date
CN116579245A true CN116579245A (en) 2023-08-11
CN116579245B CN116579245B (en) 2024-05-14

Family

ID=87539222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310552589.5A Active CN116579245B (en) 2023-05-16 2023-05-16 Grain density prediction method and device

Country Status (1)

Country Link
CN (1) CN116579245B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201107444D0 (en) * 2010-05-11 2011-06-15 Alliant Techsystems Inc Rocket and methods of control thereof
CN107316099A (en) * 2017-05-22 2017-11-03 沈阳理工大学 Ammunition Storage Reliability Forecasting Methodology based on particle group optimizing BP neural network
CN108416483A (en) * 2018-04-27 2018-08-17 无锡南洋职业技术学院 RBF type teaching quality evaluation prediction techniques based on PSO optimizations
CN110263907A (en) * 2019-07-01 2019-09-20 上海海事大学 Based on the ship short trouble diagnostic method for improving GA-PSO-BP
CN110668276A (en) * 2019-08-29 2020-01-10 浙江理工大学 Method for predicting elevator fault based on BP neural network optimized by PSO
CN111914481A (en) * 2020-07-27 2020-11-10 山西大学 Slope stability prediction method based on improved PSO-RBF algorithm
CN112070318A (en) * 2020-09-18 2020-12-11 辽宁省粮食科学研究所 Single-storey house grain temperature BP neural network prediction method based on improved particle swarm algorithm
CN113051806A (en) * 2021-03-31 2021-06-29 浙江工业大学 Water quality BOD measuring method based on AQPSO-RBF neural network
CN115408946A (en) * 2022-09-07 2022-11-29 中国兵器装备集团自动化研究所有限公司 Quality evaluation model construction method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201107444D0 (en) * 2010-05-11 2011-06-15 Alliant Techsystems Inc Rocket and methods of control thereof
CN107316099A (en) * 2017-05-22 2017-11-03 沈阳理工大学 Ammunition Storage Reliability Forecasting Methodology based on particle group optimizing BP neural network
CN108416483A (en) * 2018-04-27 2018-08-17 无锡南洋职业技术学院 RBF type teaching quality evaluation prediction techniques based on PSO optimizations
CN110263907A (en) * 2019-07-01 2019-09-20 上海海事大学 Based on the ship short trouble diagnostic method for improving GA-PSO-BP
CN110668276A (en) * 2019-08-29 2020-01-10 浙江理工大学 Method for predicting elevator fault based on BP neural network optimized by PSO
CN111914481A (en) * 2020-07-27 2020-11-10 山西大学 Slope stability prediction method based on improved PSO-RBF algorithm
CN112070318A (en) * 2020-09-18 2020-12-11 辽宁省粮食科学研究所 Single-storey house grain temperature BP neural network prediction method based on improved particle swarm algorithm
CN113051806A (en) * 2021-03-31 2021-06-29 浙江工业大学 Water quality BOD measuring method based on AQPSO-RBF neural network
CN115408946A (en) * 2022-09-07 2022-11-29 中国兵器装备集团自动化研究所有限公司 Quality evaluation model construction method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林大志;王锐利;: "自适应变系数PSO-RBF算法及其在预测工程的应用", 现代电子技术, no. 11, 1 June 2016 (2016-06-01), pages 113 - 115 *

Also Published As

Publication number Publication date
CN116579245B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
Liu et al. Evolutionary design of artificial neural networks with different nodes
Le et al. A simple way to initialize recurrent networks of rectified linear units
KR20190068255A (en) Method and apparatus for generating fixed point neural network
Okewu et al. Experimental comparison of stochastic optimizers in deep learning
CN109994158B (en) System and method for constructing molecular reverse stress field based on reinforcement learning
WO2021103675A1 (en) Neural network training and face detection method and apparatus, and device and storage medium
KR102465571B1 (en) Techniques for performing subject word classification of document data
US20230266721A1 (en) Method for configuring a control agent for a technical system, and control device
KR102458457B1 (en) Techniques for retrieving document data
Gao et al. Curvature-adaptive meta-learning for fast adaptation to manifold data
CN116579245B (en) Grain density prediction method and device
KR20230063638A (en) Method and apparatus for weight optimization of artificial neural network using hybrid metaheuristic
Benmeziane et al. Multi-objective hardware-aware neural architecture search with Pareto rank-preserving surrogate models
JP2020155010A (en) Neural network model compaction device
CN113255871A (en) Path planning method, electronic device and computer readable storage medium
Lu Adasmooth: An adaptive learning rate method based on effective ratio
CN110889531A (en) Wind power prediction method and prediction system based on improved GSA-BP neural network
de Brébisson et al. The z-loss: a shift and scale invariant classification loss belonging to the spherical family
CN115392594A (en) Electrical load model training method based on neural network and feature screening
US11854672B2 (en) Method and apparatus for generating chemical structure
CN113313233A (en) Neural network configuration parameter training and deploying method and device for dealing with device mismatch
CN116913393B (en) Protein evolution method and device based on reinforcement learning
CN118335232A (en) Hollow explosive column density prediction method and device
Al-Behadili Stochastic local search algorithms for feature selection: a review
Wöhlke et al. Learning Hierarchical Planning-Based Policies from Offline Data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant