# Quality Evaluation ofRanunculaceae Essential Oil with the Artificial Neural Network

Authors: Xiaoxia Wang
Journal: Security and Communication Networks
 (2022)

---

## Abstract

The goal of this project is to use ANN to build a quality evaluation method forRanunculaceae essential oils in order to assist businesses or individuals in setting up an automated essential oil quality evaluation system and reducing human resource consumption. Using computer software to evaluate the quality of Ranunculaceae essential oils, quantitatively evaluate product quality, and improve the automation of quality evaluation. The main research contents in this paper are as follows: (1) In-depth research on PSO and its development. The purpose of studying the PSO is to use PSO to replace gradient descent algorithm in BP network, so that the neural network model has a better network structure. This paper improves it on the basis of PSO. The basic improvement idea is to add a dynamic random position transformation to the particle, so that global optimization ability can be enhanced. The improved algorithm and the standard algorithm are compared and analyzed in the simulation experiments. The results verify that improved PSO has better optimization ability. (2) Replace training algorithm in the BP network with the IPSO and construct the BP network algorithm model of IPSO. The final implementation of the Ranunculaceae plant essential oil quality assessment model based on the IPSO-BP network was achieved by combining the Ranunculaceae plant essential oil quality evaluation index system with the Ranunculaceae plant essential oil quality evaluation index system. Finally, a simulation experiment was designed to compare the presentation of PSO-BP and IPSO-BP, when they were applied to the evaluation of Ranunculaceae vital oils. The experimental results show IPSO-BP has the highest estimate accuracy and the best performance.


---

## Body

## 1. Introduction

Plant essential oils, also known as essential oils or essential oils, are secondary metabolites of plants, volatile aromatic substances extracted from different tissues of plants through various methods. Its molecular weight is small and can be extracted by physical methods. It is a volatile oily liquid, mostly colorless. Essential oils are widely distributed in the plant kingdom, and they are generally extracted by traditional methods such as distillation and organic solvent extraction. The operation process is simple, but there are many shortcomings. With the development of science and technology, a variety of new extraction approaches with higher efficiency have been invented, such as ultrasonic-assisted extraction and supercritical CO2 fluid extraction [1–5].Plant essential oils have powerful functions and applications. The traditional storage and preservation methods are not effective. Most of the plant essential oils contain antioxidant substances, which are very popular in food preservation. The antioxidant properties of plant essential oils can be combined with other technologies to keep vegetables and fruits fresh. It can reduce the respiration and transpiration of fruits and vegetables, reduce the loss of water to maintain good taste and flavor, prolong shelf life and storage time, and reduce economic losses [6, 7].The continuous acceleration of the pace of life can easily cause people to generate huge pressure, making people physically and mentally exhausted, and being in a state of fatigue for a long time is not conducive to physical health and in severe cases, it will affect life safety. Some essential oils from plants can help to lower blood pressure, minimize metabolite accumulation, relieve anxiety and exhaustion, lessen negative side effects, improve learning and memory, and increase sleep quality. Plant essential oils have been discovered to trigger apoptosis in cancer cells and have substantial clinical benefits on cancer cell inhibition and DNA repair, according to studies. Different plant essential oils should have inhibitory effects on the various cancers and have significant antitumor effects [8, 9].People often use chemical drugs to prevent and eliminate mosquitoes. Although they have achieved good results, they are prone to drug resistance and adversely affect the environment. Plant essential oils are easily degradable and have good safety performance. They have the functions of contact killing, repelling, attracting and inhibiting the growth of various pests, and are safer for higher animals. Plant essential oil is composed of a variety of components, and each component can interact with each other, which is not easy to make mosquitoes resistant to drugs, and is environmentally friendly [10, 11].Plant essential oils have aroma, moisturizing, and antiseptic functions, and are used for the research of cosmetics and daily necessities. Essential oils have a refreshing scent and can be used in the preparation of perfumes, which have a refreshing, calming, and fatigue-relieving effect. It has a fresh fragrance, small molecular weight, and strong penetrating ability, which can speed up skin absorption, promote blood circulation, slow down skin aging and wrinkles, increase skin elasticity, improve skin quality, and achieve the purpose of skin care. Perming and dyeing hair can easily cause dry hair and split ends. Plant essential oils can protect hair from physical damage, repair damaged hair, and increase hair toughness and luster [12, 13].When used in feed, plant essential oil has a unique smell that can increase cattle feed intake and improve conversion rates. It has antioxidant, insecticidal, and antiseptic properties, and is used as feed additives, pesticides, and preservatives, and plays an important role in livestock breeding. Essential oils can be used to improve the immune mechanism and stress ability of livestock and reduce the occurrence of diseases. Adding oregano essential oil to the feed has strong antibacterial and bactericidal ability, and has good control of intestinal diseases caused by various microorganisms and pathogenic bacteria. It can improve the intestinal microflora of livestock, increase the disease resistance of the intestine, and reduce the infection of pathogenic bacteria [14, 15].Because of the powerful effects of plant essential oils, the quality evaluation of plant essential oils is very important. But so far, there is no efficient method for evaluating the quality of plant essential oils. Based on the essential oils ofRanunculaceae plants, this work combines the quality evaluation of essential oils with artificial neural networks to design an efficient quality evaluation method for essential oils of Ranunculaceae plants.The paper arrangements are as follows:Section2 examines the appropriate ANN model for the application. Section 3 discusses the improved particle method. The particle updates its own data, i.e., it converges to the local extremum and is unable to escape. They analyze the IPSO-BP network for quality evaluation of Ranunculaceae essential oil. Section 4 Based on the aforementioned information, imitation experiments will be designed to examine the enhancement of the particle swarm optimization technique. Section 5 concludes the article.


## 2. Related Work

An artificial neural network model that is adequate for the application, an acceptable network topology, and an effective training procedure are all important considerations when selecting one for use in practice [16]. ANN research concentrates mostly on adjusting the structure and improving the training method for a certain network model. Using a feedforward neural network allows for fast convergence and simple learning. Literature [17] suggests that three or more levels of the network structure are commonly used in actual applications. The neural network’s arbitrary approximation theorem states that any continuous function can be arbitrarily approximated by training an appropriate multilayer feedforward neural network. Because it is simple and successful, the classic error back-propagation method has become the most commonly researched and implemented supervised learning technique. According to literature [18], the BP method has a number of drawbacks, including sluggish convergence in multilayer networks and the risk of falling into a local minimum. The upgraded BP algorithm can take several forms, the most common of which is the addition of additional momentum and learning rate to the BP network. Although the problem of quickly sliding into local minima is improved by the added momentum technique, sluggish convergence is still a problem. By limiting the learning rate to a given range, the method of altering the learning rate automatically adapts. Despite its ability to increase the network’s convergence rate, it has a small impact on the weights, which means huge errors will persist. Training time period and fast convergence speed have been claimed by literature [19] for the LM approach. This is a high-dimensional operation problem with a lot of storage space requirements since the LM approach needs to calculate the error’s Jacobian matrix. However, LM has the drawback of being prone to local minima.Reference [20] proposes that in the traditional neural network training process, prediction correction method, or empirical selection is the most commonly used network structure selection method. The training algorithm is known in the above study for optimizing weights and thresholds, and it has the disadvantage of being easy to fall into the local optimum and difficult to jump out. Therefore, the error function must be a continuously derivable function. Literature [21] proposed a new weight training method by combining BP algorithm and differential evolution and used it in the prediction experiment of breast cancer, and achieved good results. Reference [22] uses the differential evolution algorithm to train and optimize the weights of the feedforward network, and compares optimization results with several other network training methods based on gradient descent. The results show that the method has better accuracy. Literature [23, 24] proposed that the application of DE and PSO to online training and optimization of network weights has obvious advantages, and these improved methods have also been successfully applied in the fields of medicine and engineering technology. References [25, 26] proposed a hybrid algorithm and applied it to the weight optimization of neural network. In the optimization process, first determine the network structure, and then use the global search ability of PSO to obtain the final weight combination, and finally use the traditional method to fine-tune the weights to find better results.


## 3. Method

This work proposes an improved particle swarm optimization algorithm (IPSO) and combines it with BP network to construct the IPSO-BP network, which can achieve the quality evaluation ofRanunculaceae essential oils. The structure of IPSO-BP is illustrated in Figure 1.Figure 1
Structure of IPSO-BP.


### 3.1. Improved PSO

#### 3.1.1. PSO

The basic idea of particle swarm optimization algorithm is to use the collective intelligence of the population to perform a global search and compare the local optimal solutions according to the fitness function. Premise assumptions and conventions, compared with statistical methods, particle swarm optimization algorithm is purer, and the scope of application is wider.The population of the particle swarm optimization technique is made up of some abstract particle individuals. Individuals have neither mass nor volume, and the population’s dimension is the number of individuals. Assuming that the dimension of a certain group isn, the position of the i-th particle in the population in the n-dimensional space is represented by vector Ai=a1,a2,…,an , and the flying speed of the particle is represented by vector Bi=b1,b2,…,bn. In the particle swarm optimization algorithm, each individual particle maintains the individual optimal value that it has searched for. Then, in the process of individual particle flight search, it is necessary to compare with the global optimal value to judge and update its own position. Its essence is to exchange the global search result information, which is also the global search capability of the particle swarm algorithm. Its formula is as follows:(1)bt+1=bt+a1rpbt−pt+a2rgbt−pt,(2)pt+1=pt+bt+1.The last expression in equation (1) represents the global general gain when the particle swarm moves in the solution space. It is the essence of the particle swarm optimization algorithm because this expression means that the PSO algorithm does have the global optimization search ability. In the particle swarm optimization algorithm, each particle of the populat\ion dynamically adjusts its motion attributes by combining the social cognition experience of the population and its own exploration and learning experience.In practical optimization applications, it is often hoped that the particles can have a large acceleration when the standard particle swarm optimization method is just started, thereby improving the global search ability. When the population acquires a specific piece of information, the search space is quickly converged to a narrower range, and the particle velocity is reduced so that the particles can explore finely within this local range. Therefore, a non-negative inertia weight is added to the particle’s speed term to control the speed of the current particle’s speed transformation.(3)bt+1=wbt+c1rpbt−pt+c2rgbt−pt.Dynamically changing inertia weights can achieve better optimization capabilities than fixed inertia weights. The inertia weight can change linearly during the particle swarm search process, or it can change dynamically according to a certain measure function of the particle swarm performance. The basic flow of the standard particle swarm optimization algorithm is shown in Figure2.Figure 2
PSO flowchart.It can be seen from the formula of the standard particle swarm optimization that the advantages of the particle swarm optimization algorithm are very significant compared to the steepest descent algorithm and other conventional back-propagation optimization algorithms.(1)
The superiority of the idea of swarm intelligence itself is that it is not easy to fall into local extreme values, and it has the ability of global search and optimization.(2)
The population converges quickly to the global optimum.(3)
Except when exchanging information, each particle’s search is parallel. The movement between particles can be considered independent of one another, and each particle advances on its own proper route.(4)
There are no special assumptions and restrictions on the input data, which makes the particle swarm optimization algorithm applicable to the solution of almost all optimization problems.(5)
Almost without modifying any parameters, it can be input into the model.(6)
The standard particle swarm algorithm has a simple idea, which only includes some basic mathematical operations and coding mapping rules, and does not have high requirements for the input data itself. The computational time complexity of the particle swarm algorithm is much lower than that of the genetic algorithm, and it does not require the derivative of the error function like the back-propagation algorithm. It only needs to calculate the output value, which is very convenient for computer operation processing.


#### 3.1.2. Improved Method

The standard particle swarm optimization algorithm is likely to have the same problem as the steepest descent method when the particle updates its own information, that is, it converges to the local extremum and cannot escape. Because every time the population exchanges information, the search scope is narrowed. At this time, it is very likely that the particle has not searched all the regions, or it is too late to find the optimal solution. The search area is shrunk by the population, resulting in the optimal solution being excluded from the search range and never converging to the global maximum. Many literature have studied this problem, such as increasing the number of particles to improve the global search ability. But the essence of the problem remains unchanged, and the global search scope is still narrowed. Therefore, this paper tries to expand this problem; each particle searches for the extreme value found by itself, and compares it with the extreme value found by the population. If the extreme value found by the population is better than the extreme value found by the particle itself, the strategy of the standard particle swarm method is to update the position and coordinate vector of the particle to the position and coordinate of the extreme value point found by the population. At this time, the search range of the population will be narrowed to the vicinity of the extreme point, but the strategy adopted in this paper is to add a random variation factor after the population finds the extreme point. After the position and coordinates of the particles are updated, the global search range is still maintained. It avoids the global optimal solution being excluded from the search area, and at the same time modifies the adaptive function and modifies the conditions for the particle to end the search, so that the particle can finally exit the iteration.This paper’s improved particle swarm optimization algorithm can broaden the search range of particles in the solution space, resulting in a random distribution of particles in the global search range. This allows the algorithm to reach the best solution faster while also ensuring that no local convergence occurs.In order to overcome the premature convergence of the algorithm, it is easy to fall into the local optimum. After exchanging the optimal information, when narrowing the search range, a new dynamic position transformation is added, so that the particles can have different random search capabilities at different stages. At the same time, some checking mechanisms are added to regulate whether the particles have a tendency to locally converge. This can adjust the movement speed and position of the particles in time, so that the particle swarm can continue to maintain a fast convergence speed as a whole, without sacrificing the global optimization ability of the particle swarm optimization algorithm itself. The design of the improved particle swarm optimization algorithm (IPSO) is discussed in detail below.The variation factor of a particle is a binary random function with respect to the number of iterations and time. Use the number of iterations to consider and add time as an independent variable. When the population is initialized, the time is 0, and no mutation occurs within a certain period of time. Therefore, the significance of the independent variable time is to control the timing of change occurrence. At the same time, the consideration of the number of iterations is that if the population still does not converge when the number of iterations reaches a certain value, the mutation is turned on, so that the particles have a global search range.When the position of the particle is always in a certain area and it is difficult to escape, it is considered that the population has the possibility of converging to the local optimum, and the mutation can be turned on. The specific variation factor operation is, on the basis of the formula of the standard particle swarm optimization algorithm, the position of the modified particle is as follows:(4)pt+1=Pt×r×pt+1,Pt=σt2NPmax−Pmin+2σt2NPmin−Pmax+Pmax.The specific implementation steps of IPSO are as follows:(1)
Initialize the particle swarm, initialize the dimension of the population, the initial velocity, and initial position of the individual particle, and the extreme value of the velocity. Initialize the optimal value of each particle in the population and the global optimal value of the population, set the fitness function, and the maximum iterative evolution times to ensure that the algorithm can finally end.(2)
According to the global optimal value and individual optimal value of the population, update the speed, and position of each individual in the population. And determine whether the speed of each particle is out of bounds; if it is out of bounds; use the speed threshold to limit the speed of the particles.(3)
According to the individual optimal values of all individuals in the population, update the global optimal value of the population.(4)
According to the speed and position difference of the population before and after evolution, if the population has the possibility of converging to the local optimum, compare the number of iterations and the number of times of convergence to the local. According to the dynamic variation formula, the position of the particles is dynamically adjusted and has a certain uniform distribution globally.(5)
Transfer if the end condition is not met.(6)
The algorithm operation ends. The final judgment condition is that the fitness of the particle conforms to the expected error range or the algorithm encounters an abnormality. The adaptive mutation will be called when the position and velocity of the particles in the population are updated, which is used to increase the diversity of the population and maintain a good convergence speed.


### 3.2. IPSO-BP Network for Quality Evaluation ofRanunculaceae Essential Oil

#### 3.2.1. PSO-BP

Realize the combination of particle swarm and BP neural network. This content will be the focus of the research in this section. The basic idea is to map the dimension values of the position matrix of each particle of the population in the particle swarm optimization algorithm to the network weights and thresholds of the BP neural network. The fitness function of the typical PSO-BP neural network model is developed using the training data set. In the typical BP neural network training procedure, the fitness function works similarly to the mean squared error function. In essence, the fitness function or mean square error function is the objective function of the optimization problem. As an optimization problem, the solution of the standard PSO-BP neural network model can be transformed into the particle corresponding to the global minimum of the fitness function, which is the global optimal solution. And the value of each dimension of the particle’s position matrix is the network weight and threshold required by the BP neural network. The specific design steps are given below.The number of population particles. According to a large number of simulation experiments carried out in this paper and the research experience of predecessors, when using particle swarm optimization algorithm to solve general function optimization problems, the number of particles is generally 10. Therefore, in the particle swarm optimization back-propagation neural network model studied in this paper, the number of particles is 10.A single particle in the particle swarm’s dimension value. According to previous research experience, the dimension of a single particle of particle swarm is as follows:(5)d=Y2Y1+1+Y2+Y3.Each particle in the particle swarm’s initial position. The value of each element can be between (−1.5, 1.5), that is, the lower limit of the position is −1.5, the upper limit is 1.5, and it is checked whether it is out of bounds during each iteration.The velocity threshold for the individual particles of the particle swarm. Since the number of particles selected in this paper is 10, the range is set to (−10, 10), that is,Bmax=20Selection of learning factors. According to the experience obtained in the simulation experiment,c1=1.5, c2=2.Selection of termination conditions. Set the maximum number of iterations to 1000. When the number of iterations reaches the maximum number, the program will be terminated. Set the precision to meet the optimization requirements. When the value of the fitness function is lower than the precision error, the program will be terminated; if an abnormal situation occurs, the program will be terminated.The fitness function was designed. The fitness function is the mean squared error. Figure3.Figure 3
PSO-BP flowchart.Depicts the conventional PSO-BP network model’s algorithm flowchart.


#### 3.2.2. IPSO-BP

This paper offers the IPSO-BP network, which uses the improved IPSO algorithm to optimize the BP network. The flow of the network is shown in Figure4.Figure 4
IPSO-BP flowchart.The specific steps are given below and summarized as follows:(1)
The original data set was preprocessed to comprehensive the reading, quantification, discrete and normalization, and the excellence evaluation parameters ofRanunculaceae essential oil were designed according to the definite situation.(2)
According to the principle of the back-propagation neural network, the construction of theRanunculaceae essential oil quality evaluation model based on the back-propagation network is realized. This model becomes the parent of the final model constructed in this paper. This paper also begins to study the defect that the current neural network training algorithm cannot solve the function optimization problem.(3)
According to the design idea of the standard PSO-BP network model, the standard particle swarm optimization algorithm is replaced by the gradient descent algorithm. The position matrix of each particle is mapped to the weight matrix and threshold matrix of the network and the design of the fitness function of the standard PSO-BP model algorithm are completed. And finally, complete the training and optimization of neural network weights and thresholds.(4)
According to the research on IPSO, on the basis of the standard PSO-BP model, the IPSO-BP neural network model can be constructed by replacing the standard particle swarm optimization algorithm with the improved particle swarm optimization algorithm.(5)
After the algorithm iteration is over, the global optimal particle is obtained. And map its position matrix back to the connection weights and thresholds of the back-propagation neural network, which is the optimal solution of the weights and thresholds of each layer of the back-propagation neural network. Finally, it is substituted into the formula of the neural network, that is, the realization of the final model is completed.


## 3.1. Improved PSO

### 3.1.1. PSO

The basic idea of particle swarm optimization algorithm is to use the collective intelligence of the population to perform a global search and compare the local optimal solutions according to the fitness function. Premise assumptions and conventions, compared with statistical methods, particle swarm optimization algorithm is purer, and the scope of application is wider.The population of the particle swarm optimization technique is made up of some abstract particle individuals. Individuals have neither mass nor volume, and the population’s dimension is the number of individuals. Assuming that the dimension of a certain group isn, the position of the i-th particle in the population in the n-dimensional space is represented by vector Ai=a1,a2,…,an , and the flying speed of the particle is represented by vector Bi=b1,b2,…,bn. In the particle swarm optimization algorithm, each individual particle maintains the individual optimal value that it has searched for. Then, in the process of individual particle flight search, it is necessary to compare with the global optimal value to judge and update its own position. Its essence is to exchange the global search result information, which is also the global search capability of the particle swarm algorithm. Its formula is as follows:(1)bt+1=bt+a1rpbt−pt+a2rgbt−pt,(2)pt+1=pt+bt+1.The last expression in equation (1) represents the global general gain when the particle swarm moves in the solution space. It is the essence of the particle swarm optimization algorithm because this expression means that the PSO algorithm does have the global optimization search ability. In the particle swarm optimization algorithm, each particle of the populat\ion dynamically adjusts its motion attributes by combining the social cognition experience of the population and its own exploration and learning experience.In practical optimization applications, it is often hoped that the particles can have a large acceleration when the standard particle swarm optimization method is just started, thereby improving the global search ability. When the population acquires a specific piece of information, the search space is quickly converged to a narrower range, and the particle velocity is reduced so that the particles can explore finely within this local range. Therefore, a non-negative inertia weight is added to the particle’s speed term to control the speed of the current particle’s speed transformation.(3)bt+1=wbt+c1rpbt−pt+c2rgbt−pt.Dynamically changing inertia weights can achieve better optimization capabilities than fixed inertia weights. The inertia weight can change linearly during the particle swarm search process, or it can change dynamically according to a certain measure function of the particle swarm performance. The basic flow of the standard particle swarm optimization algorithm is shown in Figure2.Figure 2
PSO flowchart.It can be seen from the formula of the standard particle swarm optimization that the advantages of the particle swarm optimization algorithm are very significant compared to the steepest descent algorithm and other conventional back-propagation optimization algorithms.(1)
The superiority of the idea of swarm intelligence itself is that it is not easy to fall into local extreme values, and it has the ability of global search and optimization.(2)
The population converges quickly to the global optimum.(3)
Except when exchanging information, each particle’s search is parallel. The movement between particles can be considered independent of one another, and each particle advances on its own proper route.(4)
There are no special assumptions and restrictions on the input data, which makes the particle swarm optimization algorithm applicable to the solution of almost all optimization problems.(5)
Almost without modifying any parameters, it can be input into the model.(6)
The standard particle swarm algorithm has a simple idea, which only includes some basic mathematical operations and coding mapping rules, and does not have high requirements for the input data itself. The computational time complexity of the particle swarm algorithm is much lower than that of the genetic algorithm, and it does not require the derivative of the error function like the back-propagation algorithm. It only needs to calculate the output value, which is very convenient for computer operation processing.


### 3.1.2. Improved Method

The standard particle swarm optimization algorithm is likely to have the same problem as the steepest descent method when the particle updates its own information, that is, it converges to the local extremum and cannot escape. Because every time the population exchanges information, the search scope is narrowed. At this time, it is very likely that the particle has not searched all the regions, or it is too late to find the optimal solution. The search area is shrunk by the population, resulting in the optimal solution being excluded from the search range and never converging to the global maximum. Many literature have studied this problem, such as increasing the number of particles to improve the global search ability. But the essence of the problem remains unchanged, and the global search scope is still narrowed. Therefore, this paper tries to expand this problem; each particle searches for the extreme value found by itself, and compares it with the extreme value found by the population. If the extreme value found by the population is better than the extreme value found by the particle itself, the strategy of the standard particle swarm method is to update the position and coordinate vector of the particle to the position and coordinate of the extreme value point found by the population. At this time, the search range of the population will be narrowed to the vicinity of the extreme point, but the strategy adopted in this paper is to add a random variation factor after the population finds the extreme point. After the position and coordinates of the particles are updated, the global search range is still maintained. It avoids the global optimal solution being excluded from the search area, and at the same time modifies the adaptive function and modifies the conditions for the particle to end the search, so that the particle can finally exit the iteration.This paper’s improved particle swarm optimization algorithm can broaden the search range of particles in the solution space, resulting in a random distribution of particles in the global search range. This allows the algorithm to reach the best solution faster while also ensuring that no local convergence occurs.In order to overcome the premature convergence of the algorithm, it is easy to fall into the local optimum. After exchanging the optimal information, when narrowing the search range, a new dynamic position transformation is added, so that the particles can have different random search capabilities at different stages. At the same time, some checking mechanisms are added to regulate whether the particles have a tendency to locally converge. This can adjust the movement speed and position of the particles in time, so that the particle swarm can continue to maintain a fast convergence speed as a whole, without sacrificing the global optimization ability of the particle swarm optimization algorithm itself. The design of the improved particle swarm optimization algorithm (IPSO) is discussed in detail below.The variation factor of a particle is a binary random function with respect to the number of iterations and time. Use the number of iterations to consider and add time as an independent variable. When the population is initialized, the time is 0, and no mutation occurs within a certain period of time. Therefore, the significance of the independent variable time is to control the timing of change occurrence. At the same time, the consideration of the number of iterations is that if the population still does not converge when the number of iterations reaches a certain value, the mutation is turned on, so that the particles have a global search range.When the position of the particle is always in a certain area and it is difficult to escape, it is considered that the population has the possibility of converging to the local optimum, and the mutation can be turned on. The specific variation factor operation is, on the basis of the formula of the standard particle swarm optimization algorithm, the position of the modified particle is as follows:(4)pt+1=Pt×r×pt+1,Pt=σt2NPmax−Pmin+2σt2NPmin−Pmax+Pmax.The specific implementation steps of IPSO are as follows:(1)
Initialize the particle swarm, initialize the dimension of the population, the initial velocity, and initial position of the individual particle, and the extreme value of the velocity. Initialize the optimal value of each particle in the population and the global optimal value of the population, set the fitness function, and the maximum iterative evolution times to ensure that the algorithm can finally end.(2)
According to the global optimal value and individual optimal value of the population, update the speed, and position of each individual in the population. And determine whether the speed of each particle is out of bounds; if it is out of bounds; use the speed threshold to limit the speed of the particles.(3)
According to the individual optimal values of all individuals in the population, update the global optimal value of the population.(4)
According to the speed and position difference of the population before and after evolution, if the population has the possibility of converging to the local optimum, compare the number of iterations and the number of times of convergence to the local. According to the dynamic variation formula, the position of the particles is dynamically adjusted and has a certain uniform distribution globally.(5)
Transfer if the end condition is not met.(6)
The algorithm operation ends. The final judgment condition is that the fitness of the particle conforms to the expected error range or the algorithm encounters an abnormality. The adaptive mutation will be called when the position and velocity of the particles in the population are updated, which is used to increase the diversity of the population and maintain a good convergence speed.


## 3.1.1. PSO

The basic idea of particle swarm optimization algorithm is to use the collective intelligence of the population to perform a global search and compare the local optimal solutions according to the fitness function. Premise assumptions and conventions, compared with statistical methods, particle swarm optimization algorithm is purer, and the scope of application is wider.The population of the particle swarm optimization technique is made up of some abstract particle individuals. Individuals have neither mass nor volume, and the population’s dimension is the number of individuals. Assuming that the dimension of a certain group isn, the position of the i-th particle in the population in the n-dimensional space is represented by vector Ai=a1,a2,…,an , and the flying speed of the particle is represented by vector Bi=b1,b2,…,bn. In the particle swarm optimization algorithm, each individual particle maintains the individual optimal value that it has searched for. Then, in the process of individual particle flight search, it is necessary to compare with the global optimal value to judge and update its own position. Its essence is to exchange the global search result information, which is also the global search capability of the particle swarm algorithm. Its formula is as follows:(1)bt+1=bt+a1rpbt−pt+a2rgbt−pt,(2)pt+1=pt+bt+1.The last expression in equation (1) represents the global general gain when the particle swarm moves in the solution space. It is the essence of the particle swarm optimization algorithm because this expression means that the PSO algorithm does have the global optimization search ability. In the particle swarm optimization algorithm, each particle of the populat\ion dynamically adjusts its motion attributes by combining the social cognition experience of the population and its own exploration and learning experience.In practical optimization applications, it is often hoped that the particles can have a large acceleration when the standard particle swarm optimization method is just started, thereby improving the global search ability. When the population acquires a specific piece of information, the search space is quickly converged to a narrower range, and the particle velocity is reduced so that the particles can explore finely within this local range. Therefore, a non-negative inertia weight is added to the particle’s speed term to control the speed of the current particle’s speed transformation.(3)bt+1=wbt+c1rpbt−pt+c2rgbt−pt.Dynamically changing inertia weights can achieve better optimization capabilities than fixed inertia weights. The inertia weight can change linearly during the particle swarm search process, or it can change dynamically according to a certain measure function of the particle swarm performance. The basic flow of the standard particle swarm optimization algorithm is shown in Figure2.Figure 2
PSO flowchart.It can be seen from the formula of the standard particle swarm optimization that the advantages of the particle swarm optimization algorithm are very significant compared to the steepest descent algorithm and other conventional back-propagation optimization algorithms.(1)
The superiority of the idea of swarm intelligence itself is that it is not easy to fall into local extreme values, and it has the ability of global search and optimization.(2)
The population converges quickly to the global optimum.(3)
Except when exchanging information, each particle’s search is parallel. The movement between particles can be considered independent of one another, and each particle advances on its own proper route.(4)
There are no special assumptions and restrictions on the input data, which makes the particle swarm optimization algorithm applicable to the solution of almost all optimization problems.(5)
Almost without modifying any parameters, it can be input into the model.(6)
The standard particle swarm algorithm has a simple idea, which only includes some basic mathematical operations and coding mapping rules, and does not have high requirements for the input data itself. The computational time complexity of the particle swarm algorithm is much lower than that of the genetic algorithm, and it does not require the derivative of the error function like the back-propagation algorithm. It only needs to calculate the output value, which is very convenient for computer operation processing.


## 3.1.2. Improved Method

The standard particle swarm optimization algorithm is likely to have the same problem as the steepest descent method when the particle updates its own information, that is, it converges to the local extremum and cannot escape. Because every time the population exchanges information, the search scope is narrowed. At this time, it is very likely that the particle has not searched all the regions, or it is too late to find the optimal solution. The search area is shrunk by the population, resulting in the optimal solution being excluded from the search range and never converging to the global maximum. Many literature have studied this problem, such as increasing the number of particles to improve the global search ability. But the essence of the problem remains unchanged, and the global search scope is still narrowed. Therefore, this paper tries to expand this problem; each particle searches for the extreme value found by itself, and compares it with the extreme value found by the population. If the extreme value found by the population is better than the extreme value found by the particle itself, the strategy of the standard particle swarm method is to update the position and coordinate vector of the particle to the position and coordinate of the extreme value point found by the population. At this time, the search range of the population will be narrowed to the vicinity of the extreme point, but the strategy adopted in this paper is to add a random variation factor after the population finds the extreme point. After the position and coordinates of the particles are updated, the global search range is still maintained. It avoids the global optimal solution being excluded from the search area, and at the same time modifies the adaptive function and modifies the conditions for the particle to end the search, so that the particle can finally exit the iteration.This paper’s improved particle swarm optimization algorithm can broaden the search range of particles in the solution space, resulting in a random distribution of particles in the global search range. This allows the algorithm to reach the best solution faster while also ensuring that no local convergence occurs.In order to overcome the premature convergence of the algorithm, it is easy to fall into the local optimum. After exchanging the optimal information, when narrowing the search range, a new dynamic position transformation is added, so that the particles can have different random search capabilities at different stages. At the same time, some checking mechanisms are added to regulate whether the particles have a tendency to locally converge. This can adjust the movement speed and position of the particles in time, so that the particle swarm can continue to maintain a fast convergence speed as a whole, without sacrificing the global optimization ability of the particle swarm optimization algorithm itself. The design of the improved particle swarm optimization algorithm (IPSO) is discussed in detail below.The variation factor of a particle is a binary random function with respect to the number of iterations and time. Use the number of iterations to consider and add time as an independent variable. When the population is initialized, the time is 0, and no mutation occurs within a certain period of time. Therefore, the significance of the independent variable time is to control the timing of change occurrence. At the same time, the consideration of the number of iterations is that if the population still does not converge when the number of iterations reaches a certain value, the mutation is turned on, so that the particles have a global search range.When the position of the particle is always in a certain area and it is difficult to escape, it is considered that the population has the possibility of converging to the local optimum, and the mutation can be turned on. The specific variation factor operation is, on the basis of the formula of the standard particle swarm optimization algorithm, the position of the modified particle is as follows:(4)pt+1=Pt×r×pt+1,Pt=σt2NPmax−Pmin+2σt2NPmin−Pmax+Pmax.The specific implementation steps of IPSO are as follows:(1)
Initialize the particle swarm, initialize the dimension of the population, the initial velocity, and initial position of the individual particle, and the extreme value of the velocity. Initialize the optimal value of each particle in the population and the global optimal value of the population, set the fitness function, and the maximum iterative evolution times to ensure that the algorithm can finally end.(2)
According to the global optimal value and individual optimal value of the population, update the speed, and position of each individual in the population. And determine whether the speed of each particle is out of bounds; if it is out of bounds; use the speed threshold to limit the speed of the particles.(3)
According to the individual optimal values of all individuals in the population, update the global optimal value of the population.(4)
According to the speed and position difference of the population before and after evolution, if the population has the possibility of converging to the local optimum, compare the number of iterations and the number of times of convergence to the local. According to the dynamic variation formula, the position of the particles is dynamically adjusted and has a certain uniform distribution globally.(5)
Transfer if the end condition is not met.(6)
The algorithm operation ends. The final judgment condition is that the fitness of the particle conforms to the expected error range or the algorithm encounters an abnormality. The adaptive mutation will be called when the position and velocity of the particles in the population are updated, which is used to increase the diversity of the population and maintain a good convergence speed.


## 3.2. IPSO-BP Network for Quality Evaluation ofRanunculaceae Essential Oil

### 3.2.1. PSO-BP

Realize the combination of particle swarm and BP neural network. This content will be the focus of the research in this section. The basic idea is to map the dimension values of the position matrix of each particle of the population in the particle swarm optimization algorithm to the network weights and thresholds of the BP neural network. The fitness function of the typical PSO-BP neural network model is developed using the training data set. In the typical BP neural network training procedure, the fitness function works similarly to the mean squared error function. In essence, the fitness function or mean square error function is the objective function of the optimization problem. As an optimization problem, the solution of the standard PSO-BP neural network model can be transformed into the particle corresponding to the global minimum of the fitness function, which is the global optimal solution. And the value of each dimension of the particle’s position matrix is the network weight and threshold required by the BP neural network. The specific design steps are given below.The number of population particles. According to a large number of simulation experiments carried out in this paper and the research experience of predecessors, when using particle swarm optimization algorithm to solve general function optimization problems, the number of particles is generally 10. Therefore, in the particle swarm optimization back-propagation neural network model studied in this paper, the number of particles is 10.A single particle in the particle swarm’s dimension value. According to previous research experience, the dimension of a single particle of particle swarm is as follows:(5)d=Y2Y1+1+Y2+Y3.Each particle in the particle swarm’s initial position. The value of each element can be between (−1.5, 1.5), that is, the lower limit of the position is −1.5, the upper limit is 1.5, and it is checked whether it is out of bounds during each iteration.The velocity threshold for the individual particles of the particle swarm. Since the number of particles selected in this paper is 10, the range is set to (−10, 10), that is,Bmax=20Selection of learning factors. According to the experience obtained in the simulation experiment,c1=1.5, c2=2.Selection of termination conditions. Set the maximum number of iterations to 1000. When the number of iterations reaches the maximum number, the program will be terminated. Set the precision to meet the optimization requirements. When the value of the fitness function is lower than the precision error, the program will be terminated; if an abnormal situation occurs, the program will be terminated.The fitness function was designed. The fitness function is the mean squared error. Figure3.Figure 3
PSO-BP flowchart.Depicts the conventional PSO-BP network model’s algorithm flowchart.


### 3.2.2. IPSO-BP

This paper offers the IPSO-BP network, which uses the improved IPSO algorithm to optimize the BP network. The flow of the network is shown in Figure4.Figure 4
IPSO-BP flowchart.The specific steps are given below and summarized as follows:(1)
The original data set was preprocessed to comprehensive the reading, quantification, discrete and normalization, and the excellence evaluation parameters ofRanunculaceae essential oil were designed according to the definite situation.(2)
According to the principle of the back-propagation neural network, the construction of theRanunculaceae essential oil quality evaluation model based on the back-propagation network is realized. This model becomes the parent of the final model constructed in this paper. This paper also begins to study the defect that the current neural network training algorithm cannot solve the function optimization problem.(3)
According to the design idea of the standard PSO-BP network model, the standard particle swarm optimization algorithm is replaced by the gradient descent algorithm. The position matrix of each particle is mapped to the weight matrix and threshold matrix of the network and the design of the fitness function of the standard PSO-BP model algorithm are completed. And finally, complete the training and optimization of neural network weights and thresholds.(4)
According to the research on IPSO, on the basis of the standard PSO-BP model, the IPSO-BP neural network model can be constructed by replacing the standard particle swarm optimization algorithm with the improved particle swarm optimization algorithm.(5)
After the algorithm iteration is over, the global optimal particle is obtained. And map its position matrix back to the connection weights and thresholds of the back-propagation neural network, which is the optimal solution of the weights and thresholds of each layer of the back-propagation neural network. Finally, it is substituted into the formula of the neural network, that is, the realization of the final model is completed.


## 3.2.1. PSO-BP

Realize the combination of particle swarm and BP neural network. This content will be the focus of the research in this section. The basic idea is to map the dimension values of the position matrix of each particle of the population in the particle swarm optimization algorithm to the network weights and thresholds of the BP neural network. The fitness function of the typical PSO-BP neural network model is developed using the training data set. In the typical BP neural network training procedure, the fitness function works similarly to the mean squared error function. In essence, the fitness function or mean square error function is the objective function of the optimization problem. As an optimization problem, the solution of the standard PSO-BP neural network model can be transformed into the particle corresponding to the global minimum of the fitness function, which is the global optimal solution. And the value of each dimension of the particle’s position matrix is the network weight and threshold required by the BP neural network. The specific design steps are given below.The number of population particles. According to a large number of simulation experiments carried out in this paper and the research experience of predecessors, when using particle swarm optimization algorithm to solve general function optimization problems, the number of particles is generally 10. Therefore, in the particle swarm optimization back-propagation neural network model studied in this paper, the number of particles is 10.A single particle in the particle swarm’s dimension value. According to previous research experience, the dimension of a single particle of particle swarm is as follows:(5)d=Y2Y1+1+Y2+Y3.Each particle in the particle swarm’s initial position. The value of each element can be between (−1.5, 1.5), that is, the lower limit of the position is −1.5, the upper limit is 1.5, and it is checked whether it is out of bounds during each iteration.The velocity threshold for the individual particles of the particle swarm. Since the number of particles selected in this paper is 10, the range is set to (−10, 10), that is,Bmax=20Selection of learning factors. According to the experience obtained in the simulation experiment,c1=1.5, c2=2.Selection of termination conditions. Set the maximum number of iterations to 1000. When the number of iterations reaches the maximum number, the program will be terminated. Set the precision to meet the optimization requirements. When the value of the fitness function is lower than the precision error, the program will be terminated; if an abnormal situation occurs, the program will be terminated.The fitness function was designed. The fitness function is the mean squared error. Figure3.Figure 3
PSO-BP flowchart.Depicts the conventional PSO-BP network model’s algorithm flowchart.


## 3.2.2. IPSO-BP

This paper offers the IPSO-BP network, which uses the improved IPSO algorithm to optimize the BP network. The flow of the network is shown in Figure4.Figure 4
IPSO-BP flowchart.The specific steps are given below and summarized as follows:(1)
The original data set was preprocessed to comprehensive the reading, quantification, discrete and normalization, and the excellence evaluation parameters ofRanunculaceae essential oil were designed according to the definite situation.(2)
According to the principle of the back-propagation neural network, the construction of theRanunculaceae essential oil quality evaluation model based on the back-propagation network is realized. This model becomes the parent of the final model constructed in this paper. This paper also begins to study the defect that the current neural network training algorithm cannot solve the function optimization problem.(3)
According to the design idea of the standard PSO-BP network model, the standard particle swarm optimization algorithm is replaced by the gradient descent algorithm. The position matrix of each particle is mapped to the weight matrix and threshold matrix of the network and the design of the fitness function of the standard PSO-BP model algorithm are completed. And finally, complete the training and optimization of neural network weights and thresholds.(4)
According to the research on IPSO, on the basis of the standard PSO-BP model, the IPSO-BP neural network model can be constructed by replacing the standard particle swarm optimization algorithm with the improved particle swarm optimization algorithm.(5)
After the algorithm iteration is over, the global optimal particle is obtained. And map its position matrix back to the connection weights and thresholds of the back-propagation neural network, which is the optimal solution of the weights and thresholds of each layer of the back-propagation neural network. Finally, it is substituted into the formula of the neural network, that is, the realization of the final model is completed.


## 4. Experiment and Discussion

### 4.1. Evaluation on IPSO

In this section, imitation experiments will be designed to study the enhancement of particle swarm optimization algorithm based on the foregoing content. The experiment compares and tests the performance of the upgraded particle swarm optimization algorithm and the regular particle swarm optimization technique. This section will use three classical test functions to compare the performance of the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm studied in this paper. They can be used to test the convergence performance and iteration speed of the algorithm. The three test functions are shown in Table1.Table 1
Classic optimization test function.
FunctionDimensionSearch spaceSchaffer20−100,100dRosenbrock30−30,30mRastrigrin20−5,5kThe number of particles in the particle swarm is set to 10, and the condition for judging the convergence to the local optimum is that the position vector does not change after the algorithm iteratively runs for more than 10 times.In essence, this experiment is to compare the presentation of using the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm to solve the performance of each test function converging to the minimum or maximum value within a sure value range. This is an optimization problem, so the three test functions Schaffer, Rosenbrock, and Rastrigrin are the objective functions of this optimization problem. Therefore, according to the idea of particle swarm optimization algorithm, it is necessary to design the fitness function of the objective function in the experiment. It can be compared to the mean square error function in the gradient descent algorithm. The goal of optimization is to minimize or maximize the value of the fitness function, which is the same idea as the mean square error minimization in the gradient descent algorithm.Three test functions are used to test the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm respectively. As the number of iterations increases, the deviations in the fitness function values of the two algorithms are observed, and the fitness function is used as the objective optimization function. As the algorithm runs iteratively, better particles are found as the global optimal solution. Therefore, the performance of the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm can be compared by comparative analysis of fitness changes. The experimental results are shown in Table2. CV is convergence value. IC is number of iterations at convergence. TI is total number of iterations.Table 2
Simulation results of three test functions.
FunctionPSOIPSOTICVICCVICSchaffer0.29351.000.09168500Rosenbrock0.3878.010.1764500Rastrigrin2.8E − 685.031.4E − 672500The simulation experiments show that the enhanced particle swarm algorithm has a faster convergence rate and also maintains better global search ability. The upgraded particle swarm algorithm has a faster convergence speed and stronger global search ability than the standard particle swarm algorithm, with a reduced final result error. And the improved particle swarm optimization algorithm has a rapid convergence trend, that is to say, the global optimal solution that the algorithm can converge to is still behind. If the number of iterations is increased, it can be found that the algorithm will find a better solution, and the algorithm can obtain more accurate results, while the standard particle swarm algorithm maintains a horizontal state and converges to the local optimal value.


### 4.2. Evaluation on IPSO-BP

This project uses two self-madeRanunculaceae essential oil quality evaluation datasets, REOA and REOB, respectively. The composition of each dataset is different; REOA contains 508 training samples and 215 testing samples. REOB contains 752 training samples and 316 testing samples. The input of each sample is 8 different quality evaluation parameters, as shown in Table 3; the label is the quality grade of Ranunculaceae essential oil, which is divided into ten different grade intervals from 1 to 10. The evaluation indexes are precision and recall.Table 3
Parameters for evaluating the quality of essential oils ofRanunculaceae.
IndexParameterX1AppearanceX2ScentX3MiscibilityX4DensityX5Acid valueX6Refractive indexX7ChromatographyX8Microbial compositionThis work first verifies the convergence of IPSO-BP network and compares the loss during network training. The experimental results are shown in Figures5(a) and 5(b).Figure 5
(a) Training loss on REOA. (b) Training loss on REOB.
(a)(b)Obviously, at the beginning of training, as the number of iterations increases, the loss of the network decreases rapidly. However, when the number of iterations reaches 60 epochs, the loss of the network basically reaches the minimum value. Subsequent rises in the number of training sessions will not bring about a drop in loss. This shows that the network has reached a state of convergence on the training set at this time.To verify the validity and correctness of using the IPSO algorithm to optimize the BP network, this work compares the network performance when using PSO-BP and IPSO-BP. The experimental results are shown in Figures6(a) and 6(b).Figure 6
(a) Comparison of PSO-BP. (b) Comparison of IPSO-BP.
(a)(b)Obviously, the best performance gain can be obtained when using the IPSO-BP network. Compared with the PSO-BP network, 4.1% precision improvement and 2.9% recall improvement can be obtained on the REOA dataset, 3.2% precision improvement and 4.0% recall improvement can be obtained on the REOB dataset. These experimental data further verify the exactness and effectiveness of the IPSO strategy.To verify the correctness of deigned method, we compare this method with other methods like logistic regression, decision tree, and support vector machine. The experimental result is illustrated in Table4.Table 4
Comparison with other methods.
MethodREOAREOBPrecision (%)Recall (%)Precision (%)Recall (%)Logistic regression89.586.790.487.5Decision tree92.890.794.191.5Support vector machine95.692.296.293.9IPSO-BP98.094.298.196.1Obviously, compared with other quality evaluation methods, the IPSO-BP network designed in this work can obtain the best performance. This proves the correctness and effectiveness of the IPSO-BP network proposed in this work for the quality evaluation ofRanunculaceae essential oils.


## 4.1. Evaluation on IPSO

In this section, imitation experiments will be designed to study the enhancement of particle swarm optimization algorithm based on the foregoing content. The experiment compares and tests the performance of the upgraded particle swarm optimization algorithm and the regular particle swarm optimization technique. This section will use three classical test functions to compare the performance of the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm studied in this paper. They can be used to test the convergence performance and iteration speed of the algorithm. The three test functions are shown in Table1.Table 1
Classic optimization test function.
FunctionDimensionSearch spaceSchaffer20−100,100dRosenbrock30−30,30mRastrigrin20−5,5kThe number of particles in the particle swarm is set to 10, and the condition for judging the convergence to the local optimum is that the position vector does not change after the algorithm iteratively runs for more than 10 times.In essence, this experiment is to compare the presentation of using the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm to solve the performance of each test function converging to the minimum or maximum value within a sure value range. This is an optimization problem, so the three test functions Schaffer, Rosenbrock, and Rastrigrin are the objective functions of this optimization problem. Therefore, according to the idea of particle swarm optimization algorithm, it is necessary to design the fitness function of the objective function in the experiment. It can be compared to the mean square error function in the gradient descent algorithm. The goal of optimization is to minimize or maximize the value of the fitness function, which is the same idea as the mean square error minimization in the gradient descent algorithm.Three test functions are used to test the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm respectively. As the number of iterations increases, the deviations in the fitness function values of the two algorithms are observed, and the fitness function is used as the objective optimization function. As the algorithm runs iteratively, better particles are found as the global optimal solution. Therefore, the performance of the standard particle swarm optimization algorithm and the improved particle swarm optimization algorithm can be compared by comparative analysis of fitness changes. The experimental results are shown in Table2. CV is convergence value. IC is number of iterations at convergence. TI is total number of iterations.Table 2
Simulation results of three test functions.
FunctionPSOIPSOTICVICCVICSchaffer0.29351.000.09168500Rosenbrock0.3878.010.1764500Rastrigrin2.8E − 685.031.4E − 672500The simulation experiments show that the enhanced particle swarm algorithm has a faster convergence rate and also maintains better global search ability. The upgraded particle swarm algorithm has a faster convergence speed and stronger global search ability than the standard particle swarm algorithm, with a reduced final result error. And the improved particle swarm optimization algorithm has a rapid convergence trend, that is to say, the global optimal solution that the algorithm can converge to is still behind. If the number of iterations is increased, it can be found that the algorithm will find a better solution, and the algorithm can obtain more accurate results, while the standard particle swarm algorithm maintains a horizontal state and converges to the local optimal value.


## 4.2. Evaluation on IPSO-BP

This project uses two self-madeRanunculaceae essential oil quality evaluation datasets, REOA and REOB, respectively. The composition of each dataset is different; REOA contains 508 training samples and 215 testing samples. REOB contains 752 training samples and 316 testing samples. The input of each sample is 8 different quality evaluation parameters, as shown in Table 3; the label is the quality grade of Ranunculaceae essential oil, which is divided into ten different grade intervals from 1 to 10. The evaluation indexes are precision and recall.Table 3
Parameters for evaluating the quality of essential oils ofRanunculaceae.
IndexParameterX1AppearanceX2ScentX3MiscibilityX4DensityX5Acid valueX6Refractive indexX7ChromatographyX8Microbial compositionThis work first verifies the convergence of IPSO-BP network and compares the loss during network training. The experimental results are shown in Figures5(a) and 5(b).Figure 5
(a) Training loss on REOA. (b) Training loss on REOB.
(a)(b)Obviously, at the beginning of training, as the number of iterations increases, the loss of the network decreases rapidly. However, when the number of iterations reaches 60 epochs, the loss of the network basically reaches the minimum value. Subsequent rises in the number of training sessions will not bring about a drop in loss. This shows that the network has reached a state of convergence on the training set at this time.To verify the validity and correctness of using the IPSO algorithm to optimize the BP network, this work compares the network performance when using PSO-BP and IPSO-BP. The experimental results are shown in Figures6(a) and 6(b).Figure 6
(a) Comparison of PSO-BP. (b) Comparison of IPSO-BP.
(a)(b)Obviously, the best performance gain can be obtained when using the IPSO-BP network. Compared with the PSO-BP network, 4.1% precision improvement and 2.9% recall improvement can be obtained on the REOA dataset, 3.2% precision improvement and 4.0% recall improvement can be obtained on the REOB dataset. These experimental data further verify the exactness and effectiveness of the IPSO strategy.To verify the correctness of deigned method, we compare this method with other methods like logistic regression, decision tree, and support vector machine. The experimental result is illustrated in Table4.Table 4
Comparison with other methods.
MethodREOAREOBPrecision (%)Recall (%)Precision (%)Recall (%)Logistic regression89.586.790.487.5Decision tree92.890.794.191.5Support vector machine95.692.296.293.9IPSO-BP98.094.298.196.1Obviously, compared with other quality evaluation methods, the IPSO-BP network designed in this work can obtain the best performance. This proves the correctness and effectiveness of the IPSO-BP network proposed in this work for the quality evaluation ofRanunculaceae essential oils.


## 5. Conclusion

The research investigates the quality evaluation method ofRanunculaceae essential oil based on artificial neural network due to the lack of a complete collection of Ranunculaceae essential oil quality evaluation models in China. The overall goal of this study is to develop a quality evaluation model for Ranunculaceae essential oil based on a back-propagation neural network, analyze the model’s performance and flaws, and lead to PSO research. On the basis of the standard particle swarm optimization algorithm, the improved research is carried out to improve the optimization ability of the algorithm, so that the neural network has better network weights and thresholds. Finally, an IPSO-BP-based evaluation model for the quality of Ranunculaceae essential oils was constructed. The main work of this paper is as follows: (1) Research on the PSO algorithm and its improvement. This paper studies the basic principle and mathematical model of the PSO algorithm, and analyzes the advantages and disadvantages of the algorithm. In view of its shortcomings, a random transformation function is introduced when the particle position vector of the entire particle swarm is updated to improve the optimization ability of the algorithm. (2) Replace the steepest descent algorithm with IPSO, combine it with the back-propagation neural network, and use the particle swarm optimization algorithm to complete the network training. This allows the network to finally choose the best connection weights and thresholds, create an IPSO-BP model, and run simulation comparison tests. Comprehensive and systematic experiments verify the correctness and effectiveness of the IPSO-BP network designed in this work.



---

*Source: 3856775-2022-05-13.xml*