Aquaculture water quality parameter prediction method and system based on improved PSO

By introducing Gaussian mixture and anomalous sigmoid functions into the RBF neural network and improving the inertia weight and learning factor of the particle swarm optimization algorithm, the water quality parameter prediction model is optimized, solving the problems of prediction accuracy and convergence speed, and achieving higher prediction accuracy and faster convergence speed.

CN117195973BActive Publication Date: 2026-01-02CHANGZHOU UNIV

Patent Information

Application Number
CN202311222894.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2026-01-02
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

In existing technologies, RBF neural networks suffer from insufficient prediction accuracy and slow parameter convergence speed in water quality parameter prediction, and the global search capability and local search capability of particle swarm optimization are difficult to balance.

Method used

A radial basis function is introduced by combining Gaussian mixture function and anomalous sigmoid function. The inertia weight and learning factor in the particle swarm optimization algorithm are improved, the parameters of the RBF neural network are optimized, and the parameters of the radial basis function are optimized by using an improved particle swarm optimization algorithm.

Benefits of technology

It improves the accuracy of water quality parameter prediction and the convergence speed of the model, enhances the global search capability of particles, balances the global search and local search capabilities, and improves the overall performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195973B_ABST
    Figure CN117195973B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of aquaculture, and particularly relates to an improved PSO-based water quality parameter prediction method and system for aquaculture, which comprises collecting water quality parameters at different positions and depths in a breeding pond; training an improved radial basis function (RBF) neural network using training set data; and optimizing the parameters of the improved RBF neural network model using an improved particle swarm optimization (PSO) algorithm. The present application introduces a mixed Gaussian function and an abnormal S-shaped function into the radial basis function of the traditional RBF neural network, thereby solving the problem of weak capability of the model in nonlinear data modeling. Furthermore, the present application improves the inertia factor and the learning factor in the traditional PSO algorithm, thereby solving the problems of slow parameter convergence speed and poor global search capability in the RBF neural network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of aquaculture technology, and in particular to an improved PSO-based aquaculture water quality parameter prediction method and system. BACKGROUND

[0002] The quality of the water in the aquaculture pond directly affects the growth of aquatic products, so it is necessary to know the water quality in the aquaculture pond in real time. Understanding and analyzing the spatial distribution of the water quality parameters in the aquaculture pond can help accurately grasp the real-time water quality in the spatial area of the aquaculture pond, which is of great significance for the healthy cultivation of aquatic products in the aquaculture pond.

[0003] At present, Li Lei et al. proposed a K-means clustering algorithm function combined with a neural network to establish an RBF neural network to evaluate the heavy metal pollution of the roadside soil in Zhengbianlupiantian-Xinghuaying section. Yang Feng et al. proposed a three-dimensional spatial distribution calculation method for site heavy metal pollution based on RBF neural network. However, artificial neural networks are less used for three-dimensional spatial interpolation of aquaculture pond water quality attributes, and most RBF neural networks use Gaussian functions, but there are problems of insufficient prediction accuracy. SUMMARY

[0004] In view of the shortcomings of the existing method, the present application introduces a mixed Gaussian function and an abnormal S-shaped function radial basis function in the traditional RBF neural network to solve the problem of weak ability of the model in nonlinear data modeling. Secondly, the inertia factor and the learning factor in the traditional particle swarm optimization algorithm are improved to solve the problems of slow parameter convergence speed and poor global search ability in the RBF neural network.

[0005] The technical scheme adopted by the present application is as follows:

[0006] Step one, collect water quality parameters at different positions and depths in the aquaculture pond, and construct a training set and a test set;

[0007] Further, the water quality parameters include dissolved oxygen values.

[0008] Step two, train the improved radial basis function RBF neural network using the training set data;

[0009] Further, the improved radial basis neural network includes:

[0010] The radial basis function is linearly combined by using a mixed Gaussian function and an abnormal S-shaped function, and the formula is:

[0011] (1)

[0012] In the formula, and indicate the number of neurons in the hidden layer a neuron output result and a center position; denotes a base width of a denotes an Euclidean distance, is a weight coefficient, is a number of hidden layer nodes.

[0013] Further, the formula of the number of hidden layer nodes is:

[0014] (3)

[0015] wherein, denotes a number of input layer nodes, denotes a number of output layer nodes, denotes a variable, n is a number of hidden layer nodes.

[0016] Step three, using the improved particle swarm algorithm to optimize the improved radial basis neural network model parameters.

[0017] Further, the improved particle swarm algorithm comprises:

[0018] Step 31, sequentially combining the center position, the base width, the connection weight and the weight coefficient into a particle vector;

[0019] Step 32, mapping the position information of each particle to the improved radial basis function RBF neural network;

[0020] Step 33, using an error function to calculate the fitness function value of the particle;

[0021] Step 34, updating the inertia weight ω and the learning factors c1 and c2;

[0022] Step 35, updating the parameters in the position vector of each particle;

[0023] Step 36, recalculating the fitness function value of the new particle, and judging whether the error is within the target range, if yes, stopping iteration.

[0024] Further, the formula of the inertia weight in step 34 is:

[0025] (5)

[0026] wherein, and respectively denote the maximum value and the minimum value of the inertia weight, t is the current iteration number, T denotes the maximum iteration number.

[0027] Further, the formula of the learning factor in step 34 is:​

[0028] (6)

[0029] (7)

[0030] wherein, and respectively represent the maximum and minimum values of the learning factor, t is the current iteration number, T represents the maximum iteration number.

[0031] Further, the water quality parameter prediction system for aquaculture based on the improved PSO comprises a memory for storing instructions executable by a processor, and the processor is used to execute the instructions to realize the water quality parameter prediction method for aquaculture based on the improved PSO.

[0032] Further, the computer readable medium storing computer program codes, characterized in that the computer program codes realize the water quality parameter prediction method for aquaculture based on the improved PSO when executed by the processor.

[0033] The present application has the following beneficial effects:

[0034] 1. The mixed Gaussian function and the inverse S-shaped function radial basis function are introduced into the traditional RBF neural network, the two kinds of radial basis kernel functions are fused according to the weight form, so that the model obtains higher prediction accuracy;

[0035] 2. The dynamic inertia weight is used to improve the traditional particle swarm algorithm, and the global search ability and the local optimization ability are well balanced; in the middle of iteration, a step process is set on the inverse S-shaped decreasing curve, the ability of particles to jump out of the local optimum is enhanced, and the search ability of the particles is improved;

[0036] 3. The fixed learning factor is replaced by an S-shaped change curve, and the learning factor is improved in a dynamic adjustment mode, the S-shaped decrease of the individual learning factor and the S-shaped increase of the group learning factor are realized, and the convergence speed of the model is improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 is the flow chart of the water quality parameter prediction method for aquaculture based on the improved PSO of the present application;

[0038] Figure 2 is the improved radial basis function RBF neural network structure diagram;

[0039] Figure 3 is the network MSE value comparison diagram of different hidden layer node numbers. DETAILED DESCRIPTION

[0040] The present application will be further described below in conjunction with the accompanying drawings and examples, which are simplified schematic diagrams and only schematically show the basic structure of the present application, and thus only show the components related to the present application.

[0041] As shown in the formula (1), the improved PSO-based aquaculture water quality parameter prediction method comprises the following steps: Figure 1

[0042] The water quality parameters at different positions and depths in the culture pond are collected, and after data preprocessing, the data are divided into a training set and a test set;

[0043] In this embodiment, the water quality parameters are dissolved oxygen data, and the coordinates corresponding to different positions and depths are shown in the table.

[0044] In the traditional RBF neural network, different radial basis functions have a great influence on the performance of the RBF neural network; at present, a single Gaussian function is generally used as the radial basis function, but not all RBF neural network models can obtain higher precision by using the Gaussian function; therefore, in order to make the model obtain higher prediction precision, the present application selects to fuse the Gaussian function and the abnormal S-shaped function according to the weight to improve the traditional RBF neural network, and establishes an improved radial basis function RBF neural network structure diagram as shown in the formula (2). Figure 2

[0045] The learning process is specifically as follows:

[0046] Supposing that there are 3 neurons in the input layer, 20 neurons in the hidden layer, and 1 neuron in the output layer, , , , , are the inputs of the RBF neural network, is an arbitrary point in the culture pond, , , respectively represent the coordinate values in the x, y and z directions of the three-dimensional space coordinate axis.

[0047] The Gaussian function is used as the activation function, has great sensitivity to the response of the input signal, can help the network model to better approximate complex nonlinear problems, and thus improve the precision of the network model; the introduction of the abnormal S-shaped function can prevent the network output value from sharply increasing or decreasing, and thus increase the stability of the network; therefore, the mixed Gaussian function and the abnormal S-shaped function are linearly combined to obtain the radial basis function, the distribution of the Gaussian kernel and the abnormal S-shaped kernel in the mixed kernel function is adjusted, and thus better precision and stability are obtained, and the specific expression of the first radial basis function is as follows:

[0048] ​​​​(1)

[0049] wherein, and denote the output result of the i-th neuron of the hidden layer and the center position; denote the base width of the i-th neuron, denote the Euclidean distance, is a weight coefficient, is the number of nodes of the hidden layer.

[0050] The calculation result of the hidden layer is transmitted to the output layer, and the mapping function thereof is a linear function, and the output result is:

[0051] (2)

[0052] wherein, denote the connection weight between the hidden layer and the output layer, denote the output value of the water quality parameter at any point in the culture pond.

[0053] The output of the model is accurate or not related to the five parameters of the number of nodes of the hidden layer, the center position, the base width, the connection weight and the weight coefficient.

[0054] The number of nodes of the hidden layer is determined by the method of formula (3):

[0055] (3)

[0056] wherein, denote the number of nodes of the input layer, denote the number of nodes of the output layer, denote a variable, which is an integer ranging from 1 to 10; in the embodiment, the number of nodes of the input layer is 3, and the number of nodes of the output layer is 1, so the number of nodes of the hidden layer is between 3 and 12, and the neural network is trained and tested 10 times for different numbers of nodes in the range, and the average value of the corresponding mean square error is calculated to select the most suitable number of nodes of the hidden layer; Figure 3 is the network MSE value corresponding to different numbers of nodes of the hidden layer, and it can be seen that when the number of nodes is 11, the MSE of the neural network is the smallest, so the number of nodes of the hidden layer of the neural network is 11.

[0057] For the center position , the base width , the connection weight and the weight coefficient , the improved particle swarm optimization algorithm is used to optimize the four parameters to further improve the overall performance of the neural network.​​

[0058] The improved particle swarm algorithm is used to optimize the parameters of the improved radial basis function (RBF) neural network model, and the specific steps are as follows:

[0059] Step 31, sequentially combine the four parameters of the improved radial basis function (RBF) neural network, i.e. the center position, the base width, the connection weight and the weight coefficient, into a particle vector, i.e. ; wherein, represents the parameters of three dimensions of the i-th center of the hidden layer; Initialize the population, including the number of population, the dimension of particle, the number of population iterations, the inertia weight and the maximum and minimum values of the learning factor, and initialize the particle position and velocity.

[0060] Step 32, map the position information of each particle to the improved radial basis function (RBF) neural network.

[0061] Step 33, calculate the fitness function value of the particle by using the error function, and the formula is (4), and the individual extreme value of the particle and the global extreme value of the population are selected and compared.

[0062] (4)

[0063] wherein, is the fitness function value of the particle, is the measured value of the water quality parameter, is the predicted value of the water quality parameter, and N is the sample size.

[0064] The fitness function value represents the error degree, and the smaller the error is, the better the search performance of the particle is. When the particle reaches the minimum fitness value, the position parameter is the best preliminary parameter of the related parameters of the improved radial basis function (RBF) neural network. Compare the fitness value of the current position of the particle with the fitness value of the optimal position experienced by the particle. If it is better, replace the current optimal position with it, otherwise it remains unchanged. Compare the fitness value of the current position of the particle with the fitness value of the optimal position of the group. If it is better, record the particle serial number and replace the group optimal position with it, otherwise it remains unchanged.

[0065] Step 34, update the inertia weight ω and the learning factors c1 and c2 according to the current iteration number, and then update the velocity and position of each particle.

[0066] The inertia weight directly affects the convergence speed and solution accuracy of the algorithm. The existing inertia weight corresponds to strong global search ability in the early stage and strong local search ability in the later stage, but it is easy to fall into local optimum problem. Therefore, in order to increase the global search ability and reduce the local optimum, two steps are added to the inertia weight in the middle of the iteration, which enhances the search ability of the particle.

[0067] The learning factor determines the learning ability of the particle, c1 is an individual learning factor, and c2 is a social learning factor; in the traditional particle swarm algorithm, the learning factor is a fixed constant, which is difficult to balance global search and local search, and can affect the convergence speed and accuracy of the algorithm, so the learning factor is changed from a fixed constant to an S-shaped change curve, and a dynamic adjustment method is adopted to improve the learning factor, so that c1 is larger in the early stage and c2 is larger in the late stage, so as to balance the global search ability and local search ability of the particle.

[0068] The optimization formula of the inertia weight and the learning factor is as follows:

[0069] (5)

[0070] (6)

[0071] (7)

[0072] In the formula, max and min respectively represent the maximum value and the minimum value of the inertia weight , the maximum value and the minimum value of the learning factor are respectively taken as 0.9 and 0.2, is the current iteration number, is the maximum iteration number, t is the maximum value of the learning factor, and the minimum value of the learning factor is 1.4. T Step 35, read the parameter information contained in the new position vector of each particle, and train the improved radial basis function RBF neural network with the updated parameters; Step 36, recalculate the fitness function value of the new particle, judge whether the error is within the target range, if yes, stop iteration, if not, update the individual extreme value of the particle and the global extreme value of the group, and return to step 34;

[0073] Step 37, record the global extreme value, and end the improved particle swarm algorithm.

[0074] Map the center point, base width and connection weight and weight parameter in the final global extreme value position information to the improved radial basis function RBF neural network, train the network, complete the model construction, and take the spatial position information as the input layer data and the water quality parameter value as the output layer data, and predict and calculate the value of the aquaculture pond water quality parameter.

[0075]

[0076] Map the center point, base width and connection weight and weight parameter in the final global extreme value position information to the improved radial basis function RBF neural network, train the network, complete the model construction, and take the spatial position information as the input layer data and the water quality parameter value as the output layer data, and predict and calculate the value of the aquaculture pond water quality parameter.

[0077] ​​With the root mean square error as an evaluation index, the prediction accuracy of the traditional RBF neural network, the hybrid radial basis function RBF neural network, the particle swarm optimization hybrid radial basis function RBF neural network (PSO-HRBF) and the improved particle swarm optimization hybrid radial basis function RBF neural network (IPSO-HRBF) of the application is compared and analyzed; the comparison results are shown in Table 1, and it can be known from the table that the RMSE of the improved particle swarm optimization hybrid radial basis function RBF neural network is the smallest, indicating that the prediction accuracy of the improved particle swarm optimization hybrid radial basis function RBF neural network is better.

[0078] Table 1 RMSE results of the output of four kinds of model networks

[0079]

[0080] Based on the above ideal embodiments according to the application, the relevant staff can make various changes and modifications without deviating from the technical idea of the application according to the above description. The technical scope of the application is not limited to the content in the specification, and must be determined according to the scope of claims.

Claims

1. An improved PSO-based method for predicting water quality parameters in aquaculture, characterized by, The method comprises the following steps: Step 1, collecting water quality parameters at different positions and depths in the breeding pond; Step 2, training the improved radial basis function (RBF) neural network using the training set data; The improved radial basis neural network comprises: The radial basis function is a linear combination of a mixed Gaussian function and an abnormal S-shaped function, and the formula is: (1) In the formula, and represent the output results of the hidden layer th neuron and the center position; represent the base width of the th neuron; represent the Euclidean distance; is a weight coefficient; is the number of hidden layer nodes; is the input of the RBF neural network, is any point in the culture pond; Step 3, optimizing the parameters of the improved radial basis neural network model using the improved particle swarm optimization (PSO) algorithm.

2. The improved PSO based aquaculture water quality parameter prediction method according to claim 1, wherein, The water quality parameters include dissolved oxygen values.

3. The improved PSO based aquaculture water quality parameter prediction method according to claim 2, wherein, The formula for the number of hidden layer nodes is: (3) In the formula, represents the number of input layer nodes, represents the number of output layer nodes, represents a variable, n is the number of hidden layer nodes.

4. The improved PSO based aquaculture water quality parameter prediction method according to claim 1, wherein, The improved particle swarm optimization algorithm comprises: Step 31, sequentially combining the center position, base width, connection weight, and weight coefficient into a particle vector; Step 32, mapping the position information of each particle to the improved radial basis function (RBF) neural network; Step 33, calculating the fitness function value of the particle using an error function; Step 34, updating the inertia weight ω and the learning factors c1 and c2; Step 35, updating the parameters in the position vector of each particle; Step 36, recalculating the fitness function value of the new particle, and determining whether the error is within the target range. If yes, stop iteration.

5. The improved PSO based aquaculture water quality parameter prediction method according to claim 4, wherein, The formula for the inertia weight in step 34 is: (5) wherein, and max and min represent the maximum and minimum values of the inertial weight, t is the current iteration number, T maxiter represents the maximum number of iterations.

6. The improved PSO based aquaculture water quality parameter prediction method according to claim 4, wherein, The formula for the learning factor in step 34 is: (6) (7) wherein, and max and min denote the maximum and minimum values of the learning factor, t is the current iteration number, T max denotes the maximum number of iterations.

7. An improved PSO based water quality parameter prediction system for aquaculture, characterized by, It comprises: a memory for storing instructions executable by the processor; a processor for executing the instructions to implement the improved PSO-based water quality parameter prediction method for aquaculture as claimed in any one of claims 1-6.

8. A computer readable medium having stored thereon a computer program code, characterized in that, The computer program code, when executed by the processor, implements the improved PSO-based water quality parameter prediction method for aquaculture as claimed in any one of claims 1-7.

Citation Information

Patent Citations

  • Aquaculture water quality dissolved oxygen prediction method based on data fusion

    CN105956702A

Cited By

  • An AI-based intelligent monitoring system for water quality in aquaculture

    CN122651995A