CN117114915A - Aquaculture PH value prediction method based on improved particle swarm optimization - Google Patents
Aquaculture PH value prediction method based on improved particle swarm optimization Download PDFInfo
- Publication number
- CN117114915A CN117114915A CN202311136360.XA CN202311136360A CN117114915A CN 117114915 A CN117114915 A CN 117114915A CN 202311136360 A CN202311136360 A CN 202311136360A CN 117114915 A CN117114915 A CN 117114915A
- Authority
- CN
- China
- Prior art keywords
- value
- particle swarm
- formula
- aquaculture
- prediction
- 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.)
- Pending
Links
- 239000002245 particle Substances 0.000 title claims abstract description 86
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000009360 aquaculture Methods 0.000 title claims abstract description 37
- 244000144974 aquaculture Species 0.000 title claims abstract description 37
- 238000005457 optimization Methods 0.000 title claims description 17
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 65
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 41
- 238000012549 training Methods 0.000 claims abstract description 11
- 238000005291 chaos (dynamical) Methods 0.000 claims abstract description 5
- 230000006870 function Effects 0.000 claims description 32
- 230000000739 chaotic effect Effects 0.000 claims description 14
- 230000010355 oscillation Effects 0.000 claims description 11
- 238000012706 support-vector machine Methods 0.000 claims description 11
- 239000013598 vector Substances 0.000 claims description 7
- 238000013507 mapping Methods 0.000 claims description 6
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 claims description 5
- 230000006872 improvement Effects 0.000 claims description 5
- 239000001301 oxygen Substances 0.000 claims description 5
- 229910052760 oxygen Inorganic materials 0.000 claims description 5
- XKMRRTOUMJRJIA-UHFFFAOYSA-N ammonia nh3 Chemical compound N.N XKMRRTOUMJRJIA-UHFFFAOYSA-N 0.000 claims description 4
- 230000014509 gene expression Effects 0.000 claims description 4
- 230000033116 oxidation-reduction process Effects 0.000 claims description 4
- 230000006978 adaptation Effects 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000001514 detection method Methods 0.000 claims description 3
- 230000009191 jumping Effects 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 238000012843 least square support vector machine Methods 0.000 abstract description 8
- 238000011160 research Methods 0.000 abstract description 6
- 230000008901 benefit Effects 0.000 abstract description 5
- 230000008689 nuclear function Effects 0.000 abstract 1
- 238000004088 simulation Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000012360 testing method Methods 0.000 description 4
- 230000007547 defect Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 235000013305 food Nutrition 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002028 premature Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 241000195493 Cryptophyta Species 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000002378 acidificating effect Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000004378 air conditioning Methods 0.000 description 1
- 238000000137 annealing Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000004720 fertilization Effects 0.000 description 1
- 208000010824 fish disease Diseases 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 210000002816 gill Anatomy 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000011664 nicotinic acid Substances 0.000 description 1
- 239000000575 pesticide Substances 0.000 description 1
- 238000000611 regression analysis Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/02—Agriculture; Fishing; Forestry; Mining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/10—Machine learning using kernel methods, e.g. support vector machines [SVM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial 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]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N7/00—Computing arrangements based on specific mathematical models
- G06N7/08—Computing arrangements based on specific mathematical models using chaos models or non-linear system models
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Business, Economics & Management (AREA)
- Computational Linguistics (AREA)
- Marketing (AREA)
- Marine Sciences & Fisheries (AREA)
- Animal Husbandry (AREA)
- Mining & Mineral Resources (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Tourism & Hospitality (AREA)
- Strategic Management (AREA)
- Primary Health Care (AREA)
- Molecular Biology (AREA)
- General Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Agronomy & Crop Science (AREA)
- Nonlinear Science (AREA)
- Algebra (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to an aquaculture PH value prediction method based on an improved particle swarm algorithm, which comprises the steps of firstly utilizing a chaos theory to swarm a better initial population, secondly adding disturbance items to improve the diversity of particles, obtaining punishment parameters and nuclear parameters of an optimal nuclear function of a least square support vector machine, and constructing the improved particle swarm algorithm and the least square support vector machine as a prediction model IPSO-LSSVM. Compared with PSO-LSSVM and LSSVM prediction models, the method provided by the invention has the advantages that the Root Mean Square Error (RMSE) between the actual value and the predicted value is reduced by 52.19% and 76.23%, the Mean Absolute Error (MAE) between the actual value and the predicted value is reduced by 58.39% and 86.64%, the correlation coefficient is increased, the training time is shortened, the accuracy of the prediction models is improved, and reference data and practical models are provided for aquaculture water quality prediction research.
Description
Technical Field
The invention relates to the technical field of aquaculture water quality prediction, in particular to an aquaculture PH value prediction method based on an improved particle swarm algorithm.
Background
With the continuous development of the technology of the Internet of things and the scientific technology of the big data technology, aquaculture serving as the traditional industry is also rapidly developed. The first large country of China as the world of the quantity of aquaculture foods, the quantity and quality of the aquaculture foods influence the income increase of fishermen economy, and the method is also an important aspect for guaranteeing the national grain safety. However, most farmers pursue the yield and economic benefit, high-density cultivation is easy to occur, and fertilization and pesticide application are unreasonable and unscientific, so that the ecological unbalance of the cultivation pond is caused by serious self-pollution of the cultivation water quality. The extensive cultivation modes have the advantages that the water quality of cultivation is deteriorated to induce disease outbreaks of aquatic products and even mass death, and serious cultivation risks and economic losses are brought to huge aquaculture industries. Therefore, the change rule of the water quality parameters is found out, the prediction and early warning of the water quality parameters are one of the key technologies of intelligent aquaculture, and the method has important practical value and practical significance. The pH value of the water quality parameter has a key influence on aquaculture, the pH value in aquaculture is crossly influenced by multiple factors such as dissolved oxygen, temperature, related chemical substances, animal and plant activities and the like in water, and the mechanism is complex, so that the comprehensive health state of the aquaculture water body is represented. Taking the weever in California as an example, the pH value range is relatively friendly from 6 to 9, when the pH value is less than 6, the weever is easy to suffer from various fish diseases, the slightly acidic water is easy to cause algae propagation to damage the weever, when the pH value is more than 9, the fish gills are corroded, abnormal blood streaks appear, and the maintenance of the stable pH value is also important. The PH value prediction belongs to the interaction of ecological parameters in multiple aspects of the cultivation water area environment, the mechanism is complex, the characteristics of hysteresis, nonlinearity, fuzzy uncertainty, high dimensionality and the like are achieved, and the nonlinear prediction model is very difficult to construct by the prediction method.
Firstly, the traditional water quality prediction method adopted by students at home and abroad comprises a time sequence method, fuzzy reasoning, regression analysis and the like, and has the main defects of more parameters, complex operation and failure to meet the requirement of accurate prediction of aquaculture water quality. Along with the continuous development of artificial intelligence and bionic technology, the method comprising gray model, artificial neural network, support vector machine and the like and the extended least square support vector machine thereof are adopted in the nonlinear prediction direction to achieve a certain effect in water quality parameter prediction, and meanwhile, the method has the defects of easy local optimum, under learning and over learning, complex algorithm, poor operability and the like, and also has no fully mature theory. In recent years, in the water quality parameter prediction direction, some scholars also combine intelligent algorithms such as ant colony algorithm, genetic algorithm, particle swarm algorithm and the like to perform parameter optimization by combining a neural network or a support vector machine, so that the algorithm is improved in various aspects, but because the aquaculture water quality prediction has complexity, the combined model of the intelligent algorithm of the clusters and the support vector machine or the least square support vector machine is a necessary and important research direction and trend in the field. Although the combination algorithm solves the problems of low algorithm complexity, poor operability and the like, the combination algorithm also has the problems of low robustness, low precision, low convergence speed and the like.
For predicting the aquaculture water quality by adopting an improved particle swarm algorithm and a combined least square support vector machine, in recent years, more improved particle swarm algorithms are researched by domestic and foreign students, and a self-adaptive inertia weight method is introduced by some students for considering the inertia weight so as to give consideration to global search and local search; some scholars research learning factors in a basic particle swarm algorithm, propose an asynchronous time-varying method acceleration coefficient, take time as a variable in the optimizing process, and correspondingly change the learning factors, so that a good effect is not obtained in practice; other scholars combine the particle swarm algorithm with the natural selection mechanism of other algorithms, select to perform superior and inferior elimination to keep the historical optimal position of the individual particles, and put forward a combined annealing algorithm to effectively jump out the local optimal so as to better optimize the particle swarm. The improved particle swarm algorithm is mainly researched aiming at parameters of a model, the parameters are modified without standard, no improvement measures are taken from root causes of the algorithm converging to local minimum values, only the problem of the local minimum is considered, and the defect of later algorithm oscillation is not considered; some researches are combined with the mixed population intelligent algorithm, so that the problem of easy sinking into local optimum is solved to a certain extent, but the complexity of the algorithm is increased, and the convergence speed is correspondingly influenced. The method aims to solve two important problems that the convergence rate is influenced by local minimum easy to be trapped and the oscillation phenomenon occurs in the later stage in the particle swarm algorithm. The improved particle swarm algorithm is provided to solve the corresponding problem, and then is used for model parameters of a least squares support vector machine to better solve the prediction of the PH value of the water quality parameters in aquaculture.
Aiming at the problems that the prediction accuracy of the PH value of the aquaculture water is low, and the traditional particle swarm algorithm is prone to being trapped in local minima and the oscillation phenomenon occurs in the later period, the invention provides the aquaculture PH value prediction method based on the improved particle swarm algorithm, which improves the accuracy of a prediction model and provides reference data and a practical model for aquaculture water prediction research.
Disclosure of Invention
The invention aims to overcome the problems in the prior art and provides an aquaculture PH value prediction method based on an improved particle swarm algorithm.
In order to achieve the technical purpose and the technical effect, the invention is realized by the following technical scheme:
an aquaculture PH prediction method based on an improved particle swarm algorithm, the method comprising the steps of:
step 1) data acquisition and data sample normalization processing;
step 2) initializing an original population, wherein the original population comprises parameter settings of particle swarm scale, learning factors, inertia weights, dynamic variable factors and maximum iteration times;
step 3) adopting a chaos theory, and determining a better population scale according to a fitness function;
step 4) selecting individual optimal values and overall optimal values of the good particles;
step 5) determining the optimal value of the iterative particles according to the additional improvement optimization parameters and the new updating function;
step 6) judging whether the optimizing condition of the maximum iteration number adaptation degree threshold is met, if so, terminating optimizing and returning to the optimized parameter combination, otherwise, jumping to the step 5);
and 7) establishing an IPSO-LSSVM prediction model by using the parameter combination obtained by optimizing the improved algorithm to obtain a prediction result.
Further, in the step 1), data acquisition is performed in a predicted water area by adopting corresponding sensors including detection of water temperature WT, dissolved oxygen DO, conductivity EC, water quality PH, oxidation-reduction potential ORP and ammonia nitrogen NH 3-nh4+, the acquired data is normalized, and all the data are normalized to a specific interval by the following formula:
wherein x is the original data, x min ,x max Respectively, the minimum and maximum of the data samples.
Furthermore, in the step 3), the chaotic optimization is introduced into the basic particle swarm algorithm PSO, and the variable ergodic property of the chaotic search is utilized to make the particle swarm search to the current optimal position iterate to generate a chaotic sequence, so that the chaotic sequence is uniformly distributed in the whole solution space;
after the algorithm parameters are determined, randomly generating a population of N particles, initializing the particles, and according to the formulaSum formulaUpdating the particle speed and position, wherein omega is inertia weight, k is iteration number, and c 1 、c 2 R is the learning factor 1 、r 2 Is mutually independent random number, p bestid P is the optimum value of the individual bestd Is the overall optimum value;
optimum p of individual bestid Definition field [0,1 ] mapped to Logistic equation]And then according to equation y n+1 =μy n (1-y n )(n=0,1,2,.., μ is more than or equal to 0 and less than or equal to 4) iterating to obtain a chaotic sequence, and mapping the chaotic sequence back to an original solution space;
finally, selecting N better population initial positions from the N random vectors according to the fitness value;
in the step 4), the current position of the selected particles is used as an individual optimal value p bestid The optimal individual extremum is taken as the overall optimal value p according to the fitness value bestd 。
Further, in the step 5), after the initial position of the population is selected, the formula is given bySum formulaThe method is combined into the following steps:
removing the particle velocity concept, simplifying the above formula to:
to further reduce the susceptibility to local minima, a perturbation term is added to increase the diversity of particles compared to the basic particle swarm algorithm PSO, so the above formula is adjusted to:
in->For additional particle learning, p avr Is to select the average value of all individual particle positions, c 3 、r 3 Respectively learn to learnA learning factor and a random number;
in order to avoid oscillation phenomenon in the later period of optimizing, a dynamic variable factor rho is added on the basis of the formula to obtain a formula:
updating the position information according to the formula, calculating the fitness value, and updating the individual optimal value p bestid And overall optimum value p bestd Generating a new population;
order the The above is simplified into: />The formula is used as an iterative formula for improving the particle swarm algorithm IPSO, wherein the value range of the dynamic variable factor rho is [ -0.1,0.1]When->And when the dynamic variable factor rho is consistent with the positive and negative conditions at the previous moment, the dynamic variable factor rho takes a positive value to accelerate the convergence rate, and otherwise, the dynamic variable factor rho takes a negative value to relieve later-stage oscillation.
Further, in the step 6), the parameter combination is penalty parameter γ and kernel parameter σ in minimum support vector machine model LS-SVM 2 The LS-SVM model adopts the following data modeling:
wherein ω is a weight vector, +.>E is a nonlinear mapping function i B is the deviation amount for the fitting error;
constructing a minimum optimization model as follows:
this satisfies the equality constraint:
solving by introducing a Lagrange method:
wherein alpha is i For Lagrangian coefficient, γ is penalty factor, and ω, e in the formula are respectively plotted according to Karush-Kuhn-Tucker optimization condition KKT i ,α i Solving a bias guide function and enabling the function value to be 0 so as to obtain an optimal condition, thereby solving a decision function model of the LS-SVM (least support vector machine) model:
wherein K (x, x i ) The kernel function is used for completing the conversion of the data from low dimension to high dimension when classifying the nonlinear sample data; x is the input of training samples, x i Is the center of the kernel function; the Gaussian radial basis function is used as a kernel function, and the expression is:
in sigma 2 I.e. as a kernel parameter.
Further, in the step 7), the penalty parameter γ and the kernel parameter σ are combined by using the parameters optimized by the improved algorithm 2 And establishing an IPSO-LSSVM prediction model.
The beneficial effects of the invention are as follows:
compared with the IPO-LSSVM and LSSVM prediction models, the method provided by the invention has the advantages that the Root Mean Square Error (RMSE) between the actual value and the predicted value is reduced by 52.19% and 76.23%, the Mean Absolute Error (MAE) between the actual value and the predicted value is reduced by 58.39% and 86.64%, the correlation coefficient is increased, the training time is shortened, the accuracy of the prediction models is improved, and reference data and practical models are provided for aquaculture water quality prediction research.
Drawings
FIG. 1 is a flowchart of a basic particle swarm algorithm;
FIG. 2 is a flow chart of an aquaculture PH value prediction model based on the IPSO-LSSVM of the invention;
FIG. 3 is a graph showing the comparison of the predicted simulation value and the true value of the three algorithms of LSSVM, PSO-LSSVM and IPSO-LSSVM applied to the PH value of aquaculture water.
Detailed Description
The invention will be described in detail below with reference to the drawings in combination with embodiments.
An aquaculture PH value prediction method based on an improved particle swarm algorithm, as shown in figure 2, comprises the following steps:
step 1) data acquisition and data sample normalization processing;
step 2) initializing an original population, wherein the original population comprises parameter settings of particle swarm scale, learning factors, inertia weights, dynamic variable factors and maximum iteration times;
step 3) adopting a chaos theory, and determining a better population scale according to a fitness function;
step 4) selecting individual optimal values and overall optimal values of the good particles;
step 5) determining the optimal value of the iterative particles according to the additional improvement optimization parameters and the new updating function;
step 6) judging whether the optimizing condition of the maximum iteration number adaptation degree threshold is met, if so, terminating optimizing and returning to the optimized parameter combination, otherwise, jumping to the step 5);
and 7) establishing an IPSO-LSSVM prediction model by using the parameter combination obtained by optimizing the improved algorithm to obtain a prediction result.
In the step 1), in this embodiment, the adopted test data is derived from a water quality monitoring system of a Qingdao Zhenzhen West Bai Yang fishing ground in Shanghai city, the main monitoring equipment of the system is a multi-parameter water quality monitoring station based on 4G-DTU transmission of the Senno Internet of things, the data acquisition is carried out in a predicted water area by adopting corresponding sensors comprising detection of water temperature WT, dissolved oxygen DO, conductivity EC, water quality PH, oxidation-reduction potential ORP and ammonia nitrogen NH 3-NH4+, the acquired data is 6 days in total from 25 days to 5 months of 2023, the data acquisition is carried out every 5 minutes, and the data at intervals of every 30 minutes are selected as effective samples in view of the problem of small period variation. The total number of effective samples in the time period is 288 groups, collected data are divided into two parts, wherein 216 groups of data are used as training samples, 72 groups of data are used as test samples, the data are respectively used for modeling training and detecting the performance of a prediction model, and the original data of part of main components are shown in table 1:
the collected data of the water quality parameters are different in unit, the values of the collected data are different by several orders of magnitude, and the convergence rate of the algorithm is affected by the fact that the values are too large, so that the collected data are required to be normalized, all the data are normalized to a specific interval by the following formula, and in the embodiment, the specific interval is selected from [0.03-0.97]:
wherein x is the original data, x min ,x max Respectively, the minimum and maximum of the data samples.
In the step 3), because the initial positions of the basic particle swarm algorithm are randomly distributed, in order to prevent certain particles from stagnating in the iterative process, chaotic optimization is introduced into the basic particle swarm algorithm PSO, and the variable ergodic property of chaotic search is utilized to enable the particle swarm to search the current optimal position for iteration to generate a chaotic sequence, so that the chaotic sequence is uniformly distributed in the whole solution space, and the problems of premature and local minimum sinking caused by particle stagnation are solved;
after the algorithm parameters are determined, randomly generating a population of N particles, initializing the particles, and according to the formulaSum formulaUpdating the particle speed and position, wherein omega is inertia weight, k is iteration number, and c 1 、c 2 For learning factors, the particles have self-summarizing and excellent individual learning ability in the group, so that the particle is close to the history most priority of the particle and the history most point in the group, the value is usually about 2, the trouble of local minimum value can be reduced by reasonably adjusting the two parameters, and r 1 、r 2 Is between [0,1 ]]Mutually independent random numbers, the two parameters are mainly used for maintaining the diversity of the population, p bestid P is the optimum value of the individual bestd Is the overall optimum value;
optimum p of individual bestid Definition field [0,1 ] mapped to Logistic equation]And then according to equation y n+1 =μy n (1-y n ) (n=0, 1, 2.,. Mu.ltoreq.4) iterating to obtain a chaotic sequence, and mapping the chaotic sequence back to the original solution space;
finally, selecting N better population initial positions from the N random vectors according to the fitness value, thereby ensuring the uniform distribution of initial particles in a solution space and accelerating the convergence speed;
in the step 4), the current position of the selected particles is used as an individual optimal value p bestid The optimal individual extremum is taken as the overall optimal value p according to the fitness value bestd 。
In the step 5), after the initial position of the population is selected, the formula is as followsAnd gong (common)A kind of electronic device with high-pressure air-conditioning systemThe method is combined into the following steps:
in order to reduce the amount of computation and improve the search efficiency, the particle velocity concept is removed, and the above formula is simplified to:
to further reduce the susceptibility to local minima, a perturbation term is added to increase the diversity of particles compared to the basic particle swarm algorithm PSO, so the above formula is adjusted to:
in->For additional particle learning, p avr Is to select the average value of all individual particle positions, c 3 、r 3 Learning factor and random number, c 3 r 3 The product of the weights as a new particle learning weight should be greater than c 1 r 1 And c 2 r 2 At least one order of magnitude smaller, such that to increase a small disturbance term to increase the diversity of particles, the learning intensity is increased, thereby avoiding the problem of "premature" phenomenon resulting in trapping in local minimum;
in order to avoid oscillation phenomenon in the later period of optimizing, a dynamic variable factor rho is added on the basis of the formula to obtain a formula:
updating the position information according to the formula, calculating the fitness value, and updating the individual optimal value p bestid And overall optimum value p bestd Generating a new population;
order the The above is simplified into: />The formula is used as an iterative formula for improving the particle swarm algorithm IPSO, wherein the value range of the dynamic variable factor rho is [ -0.1,0.1]When->And when the dynamic variable factor rho is consistent with the positive and negative conditions at the previous moment, the dynamic variable factor rho takes a positive value to accelerate the convergence rate, and otherwise, the dynamic variable factor rho takes a negative value to relieve later-stage oscillation.
In the step 6), the parameter combination is penalty parameter gamma and core parameter sigma in a least support vector machine model LS-SVM 2 The LS-SVM model adopts the following data modeling:
wherein ω is a weight vector, +.>E is a nonlinear mapping function i B is the deviation amount for the fitting error;
constructing a minimum optimization model as follows:
this satisfies the equality constraint:
solving by introducing a Lagrange method:
wherein alpha is i For Lagrangian coefficient, γ is penalty factor, and ω, e in the formula are respectively plotted according to Karush-Kuhn-Tucker optimization condition KKT i ,α i Solving a bias guide function and enabling the function value to be 0 so as to obtain an optimal condition, thereby solving a decision function model of the LS-SVM (least support vector machine) model:
wherein K (x, x i ) The kernel function is used for completing the conversion of the data from low dimension to high dimension when classifying the nonlinear sample data; x is the input of training samples, x i Is the center of the kernel function; because the PH value prediction of the aquaculture water quality and the selected characteristic vector have a linear relation, a Gaussian radial basis function with less parameter selection and high calculation efficiency is adopted as a kernel function, and the expression is as follows:
in sigma 2 I.e. the kernel parameters, penalty parameters gamma and kernel parameters sigma 2 The method has a larger influence on LS-SVM prediction of a minimum support vector machine model, wherein the regression accuracy and complexity of the model are influenced by a punishment parameter gamma, the larger the value of the punishment parameter gamma is, the larger the structural risk is, the over-fitting is easy to occur, and otherwise, the lower the complexity of the model is, the under-fitting is easy to occur, and the nuclear parameter sigma is easy to occur 2 Influencing the mirror image action range of the function, determining the distribution characteristics and range of the training sample, wherein the larger the value is, the thicker the classification is, and the under fitting is easy to occur, otherwise, the selected curve is easy to occurThe more complex the line, the finer the classification, the easier the overfitting, the reasonable penalty parameter gamma and kernel parameter sigma 2 The choice determines whether the predictive model was successful.
In said step 7), penalty parameters Y and kernel parameters σ are combined using improved algorithm optimization parameters 2 And establishing an IPSO-LSSVM prediction model.
In order to verify the effectiveness and comprehensive performance of the improved particle swarm algorithm and the method for combining the least square support vector machine for predicting the PH value in the aquaculture water quality. Simulation was performed using MATLAB-R2016a software. For convenience and feasibility of calculation and redundancy, the parameters adopted by the simulation are as follows: the population rule modulus is 50, and the learning factor c 1 c 2 =2, additional learning factor c 3 =0.2, constraint factor r 1 =r 2 =2, additional learning factor r 3 =0.8, maximum number of iterations t max =200, inertial weight ω=0.5; according to the same simulation environment, three algorithms of LSSVM, PSO-LSSVM and IPSO-LSSVM are respectively used for the predictive simulation of the PH value of the aquaculture water, the simulation flow is referred to in FIG. 2, and the penalty parameter gamma and the core parameter sigma are obtained through simulation 2 147.82 and 4.432 respectively; in order to select the PH value in the aquaculture water quality as a target, the current test parameters of water temperature WT, dissolved oxygen DO, conductivity EC, water quality PH, oxidation-reduction potential ORP and ammonia nitrogen NH 3-NH4+ are taken as input values, and the PH value at the next time point is taken as output value, and the result is shown in figure 3.
To comprehensively compare the accuracy and precision of the IPSO-LSSVM prediction model, the root mean square error RMSE between the actual value and the predicted value, the average absolute error MAE and the correlation coefficient R 2 And the like are taken as evaluation indexes, wherein the smaller the Root Mean Square Error (RMSE) and the average absolute error (MAE) are, the correlation coefficient R 2 The larger the model, the better the performance, the expressions:
wherein y is i To be a true value of the value,for predictive value +.>Is the mean value of the true value sequence,/->N is the number of test samples, which is the average value of the predicted value sequence. Table 2 below shows the error index of each prediction model and the relevant parameters, namely the training schedule:
according to the comparison result, compared with PSO-LSSVM and LSSVM, the IPSO-LSSVM respectively reduces 52.19% and 76.23% in root mean square error between actual value and predicted value, 58.39% and 86.64% in average absolute error MAE, and the correlation coefficient R 2 The method has the advantages that the method is improved by 3.19% and 6.68% respectively, the training time is obviously shortened, in the prediction of the PH value of the water quality parameter, two important problems that the basic particle swarm algorithm is easy to sink into local minima and the oscillation phenomenon appears in the later stage to influence the convergence speed are solved, the better population scale is determined by utilizing the chaos theory, the problem that the local minima is easy to sink into is solved, the oscillation phenomenon appearing in the later stage is solved by adding a small disturbance term in the iteration process of the basic particle swarm algorithm, the convergence speed of the algorithm is also accelerated, the penalty parameter and the core parameter of the optimal core function of the least square support vector machine are finally obtained by the improved particle swarm algorithm, and the improved particle swarm algorithm least square support vector machine training model is formed by the methodAnd a simulation result, which obtains a good prediction effect.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (6)
1. An aquaculture PH value prediction method based on an improved particle swarm algorithm is characterized by comprising the following steps:
step 1) data acquisition and data sample normalization processing;
step 2) initializing an original population, wherein the original population comprises parameter settings of particle swarm scale, learning factors, inertia weights, dynamic variable factors and maximum iteration times;
step 3) adopting a chaos theory, and determining a better population scale according to a fitness function;
step 4) selecting individual optimal values and overall optimal values of the good particles;
step 5) determining the optimal value of the iterative particles according to the additional improvement optimization parameters and the new updating function;
step 6) judging whether the optimizing condition of the maximum iteration number adaptation degree threshold is met, if so, terminating optimizing and returning to the optimized parameter combination, otherwise, jumping to the step 5);
and 7) establishing an IPSO-LSSVM prediction model by using the parameter combination obtained by optimizing the improved algorithm to obtain a prediction result.
2. The method for predicting the PH value of aquaculture based on the improved particle swarm algorithm according to claim 1, wherein in said step 1), data acquisition is performed in the predicted water area by using corresponding sensors including water temperature WT, dissolved oxygen DO, conductivity EC, water quality PH, oxidation-reduction potential ORP, and ammonia nitrogen NH 3-nh4+ detection, the acquired data is normalized, and all the data are normalized to a specific interval by the following formula:
wherein x is the original data, x min ,x max Respectively, the minimum and maximum of the data samples.
3. The method for predicting the PH value of aquaculture based on the improved particle swarm algorithm according to claim 1 or 2, wherein in the step 3), chaos optimization is introduced into a basic particle swarm algorithm PSO, and the chaos search is iterated to the current optimal position to generate a chaos sequence by utilizing the variable ergodicity of the chaos search, so that the chaos sequence is uniformly distributed in the whole solution space;
after the algorithm parameters are determined, randomly generating a population of N particles, initializing the particles, and according to the formulaSum formulaUpdating the particle speed and position, wherein omega is inertia weight, k is iteration number, and c 1 、c 2 R is the learning factor 1 、r 2 Is mutually independent random number, p bestid P is the optimum value of the individual bestd Is the overall optimum value;
optimum p of individual bestid Definition field [0,1 ] mapped to Logistic equation]And then according to equation y n+1 =μy n (1-y n ) (n=0, 1, 2.,. Mu.ltoreq.4) iterating to obtain a chaotic sequence, and mapping the chaotic sequence back to the original solution space;
finally, selecting N better population initial positions from the N random vectors according to the fitness value;
in the step 4), the current position of the selected particles is used as an individual optimal value p bestid The optimal individual extremum is taken as the overall optimal value p according to the fitness value bestd 。
4. The method for predicting the pH of an aquaculture based on an improved particle swarm algorithm according to claim 3, wherein in said step 5), after selecting a good initial position of the population, the formula is given bySum formulaThe method is combined into the following steps:
removing the particle velocity concept, simplifying the above formula to:
to further reduce the susceptibility to local minima, a perturbation term is added to increase the diversity of particles compared to the basic particle swarm algorithm PSO, so the above formula is adjusted to:
in the middle ofFor additional particle learning, p avr Is to select the average value of all individual particle positions, c 3 、r 3 Learning factors and random numbers, respectively;
in order to avoid oscillation phenomenon in the later period of optimizing, a dynamic variable factor rho is added on the basis of the formula to obtain a formula:
updating the position information according to the formula, calculating the fitness value, and updating the individual optimal value p bestid And overall optimum value p bestd Generating a new population;
order the
The above is simplified into:the formula is used as an iterative formula for improving the particle swarm algorithm IPSO, wherein the value range of the dynamic variable factor rho is [ -0.1,0.1]When->And when the dynamic variable factor rho is consistent with the positive and negative conditions at the previous moment, the dynamic variable factor rho takes a positive value to accelerate the convergence rate, and otherwise, the dynamic variable factor rho takes a negative value to relieve later-stage oscillation.
5. The method for predicting pH of aquaculture based on improved particle swarm optimization according to claim 4, wherein in said step 6), the parameters are combined into a penalty parameter γ and a kernel parameter σ in a minimum support vector machine model LS-SVM 2 The LS-SVM model adopts the following data modeling:
wherein ω is a weight vector, +.>E is a nonlinear mapping function i B is the deviation amount for the fitting error;
constructing a minimum optimization model as follows:
this satisfies the equality constraint:
solving by introducing a Lagrange method:
wherein alpha is i For Lagrangian coefficient, γ is penalty factor, and ω, e in the formula are respectively plotted according to Karush-Kuhn-Tucker optimization condition KKT i ,α i Solving a bias guide function and enabling the function value to be 0 so as to obtain an optimal condition, thereby solving a decision function model of the LS-SVM (least support vector machine) model:
wherein K (x, x i ) The kernel function is used for completing the conversion of the data from low dimension to high dimension when classifying the nonlinear sample data; x is the input of training samples, x i Is the center of the kernel function; the Gaussian radial basis function is used as a kernel function, and the expression is:
in sigma 2 I.e. as a kernel parameter.
6. The method for predicting the pH of an aquaculture based on an improved particle swarm algorithm according to claim 5, wherein in said step 7), the penalty parameter γ and the core parameter σ are combined with parameters optimized by an improved algorithm 2 And establishing an IPSO-LSSVM prediction model.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311136360.XA CN117114915A (en) | 2023-09-05 | 2023-09-05 | Aquaculture PH value prediction method based on improved particle swarm optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311136360.XA CN117114915A (en) | 2023-09-05 | 2023-09-05 | Aquaculture PH value prediction method based on improved particle swarm optimization |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117114915A true CN117114915A (en) | 2023-11-24 |
Family
ID=88794643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311136360.XA Pending CN117114915A (en) | 2023-09-05 | 2023-09-05 | Aquaculture PH value prediction method based on improved particle swarm optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117114915A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117522632A (en) * | 2023-12-25 | 2024-02-06 | 阳光学院 | Water quality index prediction method based on deep learning |
-
2023
- 2023-09-05 CN CN202311136360.XA patent/CN117114915A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117522632A (en) * | 2023-12-25 | 2024-02-06 | 阳光学院 | Water quality index prediction method based on deep learning |
CN117522632B (en) * | 2023-12-25 | 2024-03-08 | 阳光学院 | Water quality index prediction method based on deep learning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Huan et al. | Prediction of dissolved oxygen in aquaculture based on gradient boosting decision tree and long short-term memory network: A study of Chang Zhou fishery demonstration base, China | |
Ren et al. | A method for predicting dissolved oxygen in aquaculture water in an aquaponics system | |
CN108665106A (en) | A kind of aquaculture dissolved oxygen prediction method and device | |
CN107292436A (en) | Blue-green alga bloom Forecasting Methodology based on nonlinear kinetics temporal model | |
Song et al. | Phasmatodea population evolution algorithm and its application in length-changeable incremental extreme learning machine | |
CN117114915A (en) | Aquaculture PH value prediction method based on improved particle swarm optimization | |
Liu et al. | Prediction of dissolved oxygen content in aquaculture of Hyriopsis cumingii using Elman neural network | |
Zhu et al. | Coke price prediction approach based on dense GRU and opposition-based learning salp swarm algorithm | |
CN108734220A (en) | Adaptive Financial Time Series Forecasting method based on k lines cluster and intensified learning | |
Liu et al. | Automatic and accurate prediction of key water quality parameters based on SRU deep learning in mariculture | |
CN108614422A (en) | Dissolved oxygen optimal control method, apparatus and system in the cultivation of continental rise plant circulation water | |
CN111768622A (en) | Short-time traffic prediction method based on improved wolf algorithm | |
Li et al. | Prediction and elucidation of the population dynamics of Microcystis spp. in Lake Dianchi (China) by means of artificial neural networks | |
Jin et al. | Soft sensor modeling for small data scenarios based on data enhancement and selective ensemble | |
Markinos et al. | Introducing Fuzzy Cognitive Maps for decision making in precision agriculture | |
Xu et al. | A prediction model for grain yield in Henan province based on BP neural network | |
Geng et al. | Study on prediction of dissolved oxygen content in aquaculture water | |
Lu et al. | Dynamic evolution analysis of desertification images based on BP neural network | |
Huang et al. | Port container throughput forecast based on ABC optimized BP neural network | |
Mohamed et al. | Adaptive trainer for multi-layer perceptron using artificial gorilla troops optimizer algorithm | |
CN114357877A (en) | Fishpond water quality evaluation prediction system and method based on fuzzy evaluation and improved support vector machine | |
Huang et al. | Cultural creativity, industrial scale, management methods, and their roles in rural revitalization from the perspective of big data | |
Sun et al. | Forecasting Fish Stock Recruitment and Planning Optimal Harvesting Strategies by Using Neural Network. | |
Berger et al. | Combining machine learning and simulation modelling for better predictions of crop yield and farmer income | |
Hou et al. | Deep Learning-Based Comparative Modeling of Carbon Emissions Projections |
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 |