DO concentration prediction method based on double recurrent neural network of improved FHO
By improving the double recurrent neural network, combining VMD-ADMM and self-attention mechanism, fusing the joint gate of LSTM and GRU, and optimizing hyperparameters, the accuracy and efficiency problems of the existing DO concentration prediction method in complex environments are solved, and efficient and robust DO concentration prediction is achieved.
Patent Information
- Application Number
- CN202510474236.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-04-16
AI Technical Summary
Existing DO concentration prediction methods have low prediction accuracy under complex environmental conditions and are not efficient enough in processing multivariate time series data. Especially in the case of low signal-to-noise ratio, they are prone to redundant overfitting, with high computational complexity and time cost.
An improved dual-cyclic neural network is adopted, combined with improved variational mode decomposition (VMD-ADMM) and self-attention mechanism. By constructing a dual-cyclic neural network, fusing the joint gate (FUGate) of long short-term memory network (LSTM) and gated recurrent unit (GRU), and using the improved Fire Hawk optimization algorithm (FHO) to optimize hyperparameters, the prediction accuracy and robustness of the model are improved.
It significantly improves the accuracy and efficiency of DO concentration prediction, enhances the robustness to noise and outliers, is suitable for water quality monitoring and industrial process control, and enhances the modeling and generalization capabilities of complex time series data.
Smart Images

Figure CN120015159B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of DO concentration prediction, and in particular to a DO concentration prediction method based on an improved FHO double-circulation neural network. Background Art
[0002] Dissolved oxygen concentration is a key indicator of water quality and health, directly impacting the survival of aquatic life and the water's self-purification capacity. Dissolved oxygen is a key indicator of biological activity in water, particularly in aquaculture, rivers, lakes, and groundwater, where it influences the survival and reproduction of aquatic organisms. Accurately predicting dissolved oxygen concentration helps promptly detect changes in water quality, enabling appropriate management measures and ensuring ecosystem health. In sewage treatment plants and other industrial processes, dissolved oxygen is a crucial factor in determining wastewater treatment efficiency. Predicting dissolved oxygen concentration allows for real-time control of aeration equipment, improving treatment efficiency and reducing energy consumption.
[0003] Traditional DO concentration prediction methods rely primarily on empirical formula-based models, statistical regression analysis, or physical and chemical reaction models. These methods have low prediction accuracy under complex environmental conditions and typically require extensive historical data for modeling and verification.
[0004] In recent years, with the development of deep learning technology, researchers have gradually applied it to environmental data analysis. However, most existing deep learning models lack the ability to effectively capture the complexity of water quality changes and are inefficient in processing multivariate time series data. For example, in the EEMD-LSTM prediction model, EEMD can introduce additional uncertainty when noise is introduced, especially in low signal-to-noise ratio conditions, which can easily lead to problems such as redundant overfitting. The calculation process of hybrid MIC-BP neural network models involves extensive data analysis and matrix operations. When the input data is high-dimensional, the complexity and time cost of MIC calculations increase significantly. MIC calculation methods rely on relationships between data, and BP neural networks are prone to overfitting in complex tasks. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the present invention provides a DO concentration prediction method based on an improved FHO double-circular neural network, which aims to solve the problems in the background technology.
[0006] To achieve the above object, the present invention provides the following technical solution: a DO concentration prediction method based on an improved FHO double-circular neural network, comprising the following steps:
[0007] Step S1: Collect multi-dimensional water data from the sewage treatment plant and perform pre-processing;
[0008] Step S2: using improved variational mode decomposition to decompose the preprocessed water body multi-dimensional data into intrinsic mode functions;
[0009] Improved variational mode decomposition uses alternating direction multiplier method ADMM to optimize variational mode decomposition;
[0010] Step S3: construct a double recurrent neural network;
[0011] The specific structure of the dual recurrent neural network is: convolutional layer, batch normalization layer, maximum pooling layer, dropout layer, joint gate, long short-term memory network LSTM, gated recurrent unit GRU, attention mechanism layer, fully connected layer, output layer;
[0012] Step S4: Optimize the hyperparameters of the double recurrent neural network through the optimization algorithm to obtain the optimal double recurrent neural network, input the decomposed intrinsic mode function into the optimal double recurrent neural network, and the intrinsic mode function passes through the convolution layer, batch normalization layer, maximum pooling layer, dropout layer, joint gate, long short-term memory network LSTM, gated recurrent unit GRU, attention mechanism layer, fully connected layer, and output layer in the optimal double recurrent neural network in turn to output the DO concentration prediction result;
[0013] In step S3, the control logic of the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU are integrated into a joint gate FUGate, which manages the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU at the same time.
[0014] Furthermore, the joint gate FUGate controls the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU at the same time, which is expressed as:
[0015] ;
[0016] Where, express The output of the moment-union gate; Represents the Sigmoid activation function; and Represent the weight matrix and bias parameters shared by the joint gate, The dimension is , used to generate the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU, The dimension is , represents the input dimension, represents the hidden state dimension; express Input at the moment; Indicates the hidden state at the previous moment; is a two-dimensional vector, expressed as: , Represents the forget gate of the long short-term memory network LSTM, Represents the update gate of the gated recurrent unit GRU;
[0017] Reset gate calculations:
[0018] ;
[0019] Where, Indicates the gate The output of the reset gate of the time-controlled recurrent unit GRU; and Represent the weight matrix and bias term of the reset gate respectively;
[0020] Generate candidate memories:
[0021] ;
[0022] Where, express The content of the candidate memory at each moment; represents element-wise multiplication; and Respectively The weight matrix and bias term of ;
[0023] Cell state update of long short-term memory network LSTM:
[0024] ;
[0025] Where, express The cell state at a moment in time; express The cell state at a moment in time;
[0026] The hidden state of the gated recurrent unit GRU is updated:
[0027] ;
[0028] Where, express The hidden state of the moment; represents the hyperbolic tangent function.
[0029] Furthermore, the specific process of optimizing the variational mode decomposition using the alternating direction multiplier method ADMM is as follows:
[0030] Construct augmented Lagrangian function;
[0031] The objective function is:
[0032] ;
[0033] Where, Indicates the Intrinsic mode functions; Indicates the Frequency parameters related to the eigenmode functions; represents the total number of eigenmode functions; Indicates time The partial derivative of represents the Dirac function; represents an imaginary unit; represents a natural constant; represents the frequency parameter;
[0034] The constraints are:
[0035] ;
[0036] Where, Represents the original input signal, that is, the multi-dimensional data of the water body after preprocessing;
[0037] The constraints are passed through Lagrange multipliers Introducing the objective function and adding the quadratic penalty term, we get the augmented Lagrangian function , expressed as:
[0038] ;
[0039] Where, For penalty items; represents the Lagrange multiplier;
[0040] Alternating direction updates;
[0041] renew :
[0042] ;
[0043] Where, express After the iteration The updated value of the eigenmode function in the frequency domain; express Representation in the frequency domain; Indicates the The updated value of the eigenmode function in the frequency domain; Denotes the representation of Lagrange multipliers in the frequency domain;
[0044] renew :
[0045] ;
[0046] Where, Indicates the The eigenmode function is in the The value after iterations; Express Integral operation;
[0047] renew :
[0048] ;
[0049] Where, express Moment After iterations The value of express Moment After the iteration Intrinsic mode functions;
[0050] Alternating updates 、 、 , set two stop conditions, and stop alternating update when any one of the stop conditions is met;
[0051] The stopping conditions are:
[0052] Check all Is the update amount less than the preset threshold? , calculate the sum of squares of the Euclidean distances between two adjacent iterations, when , express After the iteration If there are no intrinsic mode functions, the iteration stops;
[0053] When the number of iterations exceeds the preset maximum number of iterations, the iteration is stopped.
[0054] Furthermore, the hyperparameters of the dual recurrent neural network include: the number of filters in the convolutional layer , the number of LSTM units in the long short-term memory network , the number of units of the gated recurrent unit GRU and the dropout rate of the dropout layer ;
[0055] The optimization algorithm adopts the improved Fire Eagle optimization algorithm. The specific process of optimizing the hyperparameters of the double recurrent neural network using the improved Fire Eagle optimization algorithm is as follows:
[0056] Encode the hyperparameters of a double recurrent neural network into a unified solution vector: ;
[0057] Randomly generate an initial fire eagle population, each fire eagle individual in the fire eagle population represents a solution vector ;
[0058] Calculate the fitness value of each fire eagle individual in the fire eagle population, and re-divide the fire eagle individuals in the fire eagle population into fire eagle individuals and prey according to the fitness value;
[0059] Simulate arson, driving away, and capturing strategies to update the locations of individual fire hawks and prey;
[0060] Perform local search for the best fire eagle individual in the current population;
[0061] When the local search satisfies: , or the current number of iterations reaches the preset maximum number of iterations, the current optimal solution is output and the corresponding objective function value , the current optimal solution As the optimal hyperparameter; Indicates the The location of each Fire Eagle individual, Indicates the The position of each Fire Eagle individual after local search optimization; Represents the fitness function value.
[0062] Furthermore, the arson strategy is simulated: the leader fire eagle individual, that is, the optimal fire eagle individual in the current fire eagle set, generates the fire source location:
[0063] ;
[0064] Where, Indicates the The location of the fire source; Indicates the The location of the leader Fire Hawk individual; Indicates the fire source control coefficient; Indicates the A random perturbation vector;
[0065] Simulated driving strategy: prey escapes due to fire:
[0066] ;
[0067] Where, Indicates the The position of each prey after the driving strategy is updated; express The current location of each prey item; represents the escape intensity coefficient; Represents a randomly generated safe location; represents the disturbance amplitude; represents a random vector;
[0068] Simulated capture strategy: Fire hawk individuals move towards prey and fire:
[0069] ;
[0070] Where, Indicates the The positions of individual fire eagles after the simulated capture strategy update; Indicates the The current location of each Fire Hawk individual; The weight coefficient that indicates the movement of the individual fire eagle towards the current optimal prey position; The weight coefficient that indicates the movement of individual fire eagles toward the fire source; Indicates the current optimal prey location.
[0071] Furthermore, in the capture strategy, inertia weight is introduced Control search criteria:
[0072] .
[0073] Furthermore, the triggering conditions for local search include:
[0074] Periodic trigger: Every The iteration triggers a local search:
[0075] ;
[0076] Where, Represents a trigger signal used to decide whether to perform a local search; Indicates the current iteration number; Indicates the periodic interval that triggers local search;
[0077] Fitness stagnation trigger: the best Fire Eagle individual continues No improvement triggers a local search:
[0078] ;
[0079] Where, Represents the fitness function value of the best Fire Eagle individual in the current iteration; represents the fitness function value of the best fire eagle individual in the previous iteration; Before The fitness function value of the optimal fire eagle individual in the iteration;
[0080] Diversity trigger: Firehawk population standard deviation falls below a set threshold Trigger a local search:
[0081] ;
[0082] Where, Indicates that the fire eagle population is The standard deviation of the dimension; Indicates the total number of dimensions;
[0083] When the local search is triggered, the optimal Fire Eagle individual is selected to perform local search optimization:
[0084] ;
[0085] Where, represents the local learning rate;
[0086] When the optimal solution after local search optimization is better than the current optimal solution, the current optimal solution is replaced.
[0087] Furthermore, multi-dimensional water data include temperature, pH value, flow rate, mixed liquor suspended solids concentration (MLSS), effluent total nitrogen, effluent ammonia nitrogen, and DO of the anoxic section of the oxidation ditch;
[0088] The preprocessing process includes: cleaning the collected multi-dimensional water body data to remove missing values and outliers; and normalizing the cleaned multi-dimensional water body data.
[0089] Furthermore, the performance of the optimal double recurrent neural network is evaluated using the mean square error, root mean square error, and mean absolute error.
[0090] Compared with the existing technology, the present invention has the following beneficial effects:
[0091] (1) The present invention improves the accuracy and efficiency of DO concentration prediction and enhances the robustness to noise and outliers. It is applicable to various scenarios such as water quality monitoring, ecological protection, and industrial process control. It provides more reliable technical support for intelligent water quality management systems and can effectively solve the technical difficulties in signal decomposition, feature selection, nonlinear modeling, and hyperparameter optimization in existing dissolved oxygen concentration prediction methods.
[0092] (2) The present invention constructs a dual-circular neural network by combining VMD-ADMM decomposition, LSTM, GRU, self-attention mechanism and other technologies, which significantly improves the modeling ability of complex time series data, especially in processing long-term dependencies, local feature extraction, global relationship capture and other aspects. The present invention integrates the control logic of the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU into a joint gate FUGate by sharing the gate parameters through gated collaboration. It also manages the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU at the same time. In the forward propagation process, it uses it to update the hidden state and cell state to achieve more efficient information flow control; through the local search Firehawk optimization algorithm, the hyperparameters of the model are further adjusted to optimize the model performance, thereby improving the accuracy and generalization ability of the prediction. The present invention can effectively overcome the limitations of traditional technologies, especially in processing complex sewage treatment data and other environmental monitoring data, showing strong potential and advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0094] like Figure 1 As shown, the present invention provides a technical solution: a DO concentration prediction method based on an improved FHO double-circular neural network, comprising the following steps:
[0095] Step S1: Multi-dimensional water data from the sewage treatment plant is collected and pre-processed through sensors and monitoring equipment. The multi-dimensional water data includes temperature, pH value, flow rate, mixed liquor suspended solids concentration (MLSS), effluent total nitrogen, effluent ammonia nitrogen, and DO of the anoxic section of oxidation ditch A.
[0096] The preprocessing process includes: cleaning the collected multi-dimensional water body data to remove missing values and outliers; and normalizing the cleaned multi-dimensional water body data:
[0097] ;
[0098] Where, It is the multi-dimensional data of the cleaned water body; is the minimum value of the multi-dimensional data of the cleaned water body; is the maximum value of the multi-dimensional data of the water body after cleaning; After normalization .
[0099] Step S2: The preprocessed multidimensional water data is decomposed into five intrinsic mode functions (IMFs) using improved variational mode decomposition (VMD). Each IMF represents the components of the original signal at different frequencies and amplitudes, providing a better representation of local features. The improved variational mode decomposition (VMD) optimizes the VMD using the alternating direction method of multipliers (ADMM).
[0100] The improved variational mode decomposition uses the alternating direction multiplier method (ADMM) to decompose the original problem into multiple sub-problems and solve them alternately. Its core is to decompose the signal (pre-processed multi-dimensional water body data) into multiple eigenmode functions by constructing a constrained optimization problem:
[0101] Construct augmented Lagrangian function;
[0102] The objective function is:
[0103] ;
[0104] Where, Indicates the Intrinsic mode functions; Indicates the Frequency parameters related to the eigenmode functions; represents the total number of eigenmode functions; Indicates time The partial derivative of represents the Dirac function; represents an imaginary unit; represents a natural constant; Represents the frequency parameter.
[0105] The constraints are:
[0106] ;
[0107] Where, Represents the original input signal, that is, the preprocessed multi-dimensional data of water bodies.
[0108] The constraints are passed through Lagrange multipliers Introducing the objective function and adding the quadratic penalty term, we get the augmented Lagrangian function , expressed as:
[0109] ;
[0110] Where, is a penalty term used to control the strictness of the constraint; represents the Lagrange multiplier.
[0111] Alternating direction updates;
[0112] renew : Derivative of the Lagrangian function, fixed and , solve in the frequency domain:
[0113] ;
[0114] Where, express After the iteration The updated value of the eigenmode function in the frequency domain; express Representation in the frequency domain; Indicates the The updated value of the eigenmode function in the frequency domain; represents the representation of Lagrange multipliers in the frequency domain.
[0115] renew :right Derivative, and set to 0, by minimizing the frequency domain energy center of the mode to obtain :
[0116] ;
[0117] Where, Indicates the The eigenmode function is in the The value after iterations; Express Integral operation; represents the weighted integral of the modal power spectrum; represents the total energy of the eigenmode function.
[0118] renew :Adjust according to the reconstruction error :
[0119] ;
[0120] Where, express Moment After iterations The value of express Moment After the iteration eigenmode functions.
[0121] Alternating updates 、 、 ,Set two stop conditions, and stop alternating updates when any one of the stop conditions is met.
[0122] The stopping conditions are:
[0123] 1. The modal update amount is small enough: Check all Is the update amount less than the preset threshold? , calculate the sum of squares of the Euclidean distances between two adjacent iterations, if , express After the iteration Intrinsic mode functions, then the iteration stops; in this embodiment, = .
[0124] 2. Reaching the maximum number of iterations: If the number of iterations exceeds the preset maximum number of iterations, the iteration will be stopped even if the condition of the modal update amount is not met; in this embodiment, the maximum number of iterations is set to 1000.
[0125] The modified variational mode decomposition (VMD-ADMM) decomposes the signal (preprocessed multi-dimensional water data) into several intrinsic mode functions through an optimization process. This process also produces a residual term, which is the error between the sum of the decomposed eigenmode functions and the signal. Specifically, the modified variational mode decomposition (VMD-ADMM) decomposes the signal into multiple eigenmode functions, each of which represents the local characteristics of the signal at different frequency components. This can be expressed as:
[0126] ;
[0127] Where, Represents the signal, i.e., the multi-dimensional data of the water body after preprocessing; Indicates the IMFs, each of which represents a different frequency component of the signal; represents the residual term.
[0128] Step S3: Construct a double recurrent neural network.
[0129] Among them, the specific structure and processing flow of the double-cycle neural network are as follows:
[0130] The convolutional layer (Conv1D) receives input data (eigenmode functions obtained by modified variational mode decomposition (VMD-ADMM)) and extracts local features from the input data.
[0131] Batch Normalization layer normalizes the output of the convolutional layer to reduce internal covariate shift, speed up the training process, and improve the generalization ability of the model.
[0132] The maximum pooling layer (MaxPooling1D) reduces the feature dimension of the output of the batch normalization layer, thereby reducing the amount of computation and extracting the most important features.
[0133] Dropout layer: The output of the maximum pooling layer is sent to the dropout layer, which randomly discards the output of some neurons to reduce overfitting and improve the generalization ability of the model.
[0134] The output of the dropout layer is fed into the LSTM network. The LSTM uses its gating mechanism (input gate, forget gate, and output gate) to process sequential data and capture long-term dependencies.
[0135] The output of the Long Short-Term Memory (LSTM) network is fed into the GRU. The GRU simplifies the structure of the LSTM network through its update and reset gates while maintaining its ability to capture long-term dependencies.
[0136] Attention layer: The output of the gated recurrent unit (GRU) is fed into the attention layer. This layer enables the model to assign different attention weights based on the importance of different parts of the input, thereby focusing on the most important parts of the input data.
[0137] The output of the attention mechanism layer is fed into the fully connected layer. This layer integrates the features extracted by the previous layers and is usually used for classification or regression tasks.
[0138] The output layer (or output layer) is fed into the fully connected layer. The output layer generates the final prediction based on the output of the fully connected layer. The structure and activation function of the output layer depend on the specific task (for example, a sigmoid activation function might be used for a binary classification task, or a softmax activation function for a multi-classification task).
[0139] Among them, since the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU are complementary in function, the present invention collaboratively shares gating parameters through gating, merges the control logic of the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU into a joint gate FUGate, and simultaneously manages the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU, thereby achieving more efficient information flow control.
[0140] The joint gate FUGate controls the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU at the same time, which is expressed as:
[0141] ;
[0142] Where, express The output of the moment-union gate; Represents the Sigmoid activation function, with an output range of [0,1]; and Represent the weight matrix and bias parameters shared by the joint gate, The dimension is , used to generate the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU, The dimension is , represents the input dimension, represents the hidden state dimension; express Input at the moment; Indicates the hidden state at the previous moment; is a two-dimensional vector, expressed as: , Represents the forget gate of the long short-term memory network LSTM, which is used to control the proportion of old memory retention. Represents the update gate of the gated recurrent unit GRU, which is used to control the integration ratio of new memory.
[0143] Reset gate calculations:
[0144] ;
[0145] Where, Indicates the gate The output of the reset gate of the time-controlled recurrent unit GRU; and Represent the weight matrix and bias term of the reset gate respectively, The dimension is , The dimension is .
[0146] Generate candidate memory, fuse the current input and historical state, expressed as:
[0147] ;
[0148] Where, express The content of the candidate memory at each moment; represents element-wise multiplication; and Respectively The weight matrix and bias term.
[0149] Cell state update of long short-term memory network LSTM:
[0150] ;
[0151] Where, express The cell state at a moment in time; express The cell state at a moment.
[0152] The hidden state of the gated recurrent unit GRU is updated:
[0153] ;
[0154] Where, express The hidden state of the moment; represents the hyperbolic tangent function.
[0155] The update of long-term memory (cell state of long short-term memory network LSTM) and short-term state (hidden state of gated recurrent unit GRU) is done by the same joint gate Coordinate to avoid logical conflicts. The forget gate of the long short-term memory network (LSTM) determines how to update the hidden state and generate new outputs. The reset gate of the gated recurrent unit (GRU) determines how to forget the information of the previous moment, and the update gate determines the fusion ratio of new and old information. control The retention ratio is adjusted while the current information integration ratio.
[0156] Step S4: The hyperparameters of the double recurrent neural network are optimized by the optimization algorithm to obtain the optimal double recurrent neural network. The decomposed intrinsic mode function is input into the optimal double recurrent neural network. The intrinsic mode function passes through the convolution layer, batch normalization layer, maximum pooling layer, dropout layer, joint gate, long short-term memory network LSTM, gated recurrent unit GRU, attention mechanism layer, fully connected layer, and output layer in the optimal double recurrent neural network in turn to output the DO concentration prediction result.
[0157] Among them, the optimization algorithm adopts the improved Fire Eagle optimization algorithm. The improved Fire Eagle optimization algorithm is obtained by combining the original Fire Eagle optimization algorithm (FHO) with local search and adding adaptive inertia weight.
[0158] Among them, the specific process of optimizing the hyperparameters of the double recurrent neural network using the improved Fire Eagle optimization algorithm is as follows:
[0159] Optimize the hyperparameters of the double recurrent neural network.
[0160] The hyperparameters of the double recurrent neural network include: the number of filters in the convolutional layer , the number of LSTM units in the long short-term memory network , the number of units of the gated recurrent unit GRU and the dropout rate of the dropout layer ,in, 、 、 is a discrete parameter, is a continuous parameter.
[0161] Encode the hyperparameters of a double recurrent neural network into a unified solution vector: .
[0162] right 、 、 Perform neighborhood search to generate candidate solutions .
[0163] Select the better solution by comparing evaluation indicators.
[0164] like Can be derived, then Fine-tune using gradient directions.
[0165] like If it is not differentiable, then Use Pattern Search.
[0166] Initialize the population: Randomly generate an initial fire eagle population, each fire eagle individual in the fire eagle population represents a solution vector .
[0167] Calculate the fitness value of each fire eagle individual in the fire eagle population, and re-divide the fire eagle individuals in the fire eagle population into fire eagle individuals and prey according to the fitness value.
[0168] The arson, driving and capture strategies are simulated to update the positions of individual fire hawks and prey.
[0169] Simulating arson strategy: The leader fire eagle individual (the best fire eagle individual in the current fire eagle set) generates the fire source location:
[0170] ;
[0171] Where, Indicates the The location of the fire source; Indicates the The location of the leader Fire Hawk individual; Indicates the fire source control coefficient, which is used to control the search range; Indicates the A random perturbation vector.
[0172] Simulated driving strategy: prey escapes due to fire:
[0173] ;
[0174] Where, Indicates the The position of each prey after the driving strategy is updated; express The current location of each prey item; represents the escape intensity coefficient (decreasing with iteration); represents a randomly generated safe location, i.e., a new location that prey may choose when trying to escape from the fire; represents the disturbance amplitude; represents a random vector.
[0175] Simulated capture strategy: Fire hawk individuals move towards prey and fire:
[0176] ;
[0177] Where, Indicates the The positions of individual fire eagles after the simulated capture strategy update; Indicates the The current location of each Fire Hawk individual; The weight coefficient of the fire eagle individual moving towards the current optimal prey position is used to control the step size of the fire eagle individual moving towards the prey; The weight coefficient of the fire eagle moving towards the fire source is used to control the step size of the fire eagle moving towards the fire source. Indicates the current optimal prey location.
[0178] Since the algorithm may cause the search accuracy to decrease due to the excessive step size in the later stage, the inertia weight is introduced in the capture strategy. Control search criteria:
[0179] .
[0180] Perform local search for the best Fire Eagle individual in the current population.
[0181] The trigger conditions for local search include:
[0182] Periodic trigger: Every The iteration triggers a local search:
[0183] ;
[0184] Where, Represents a trigger signal used to decide whether to perform a local search; Indicates the current iteration number; Indicates the periodic interval that triggers local search.
[0185] Fitness stagnation trigger: the best Fire Eagle individual continues No improvement triggers a local search:
[0186] ;
[0187] Where, Represents the fitness function value of the best Fire Eagle individual in the current iteration; represents the fitness function value of the best fire eagle individual in the previous iteration; Before The fitness function value of the optimal Fire Eagle individual in the iteration.
[0188] Diversity trigger: Firehawk population standard deviation falls below a set threshold Trigger a local search:
[0189] ;
[0190] Where, Indicates that the fire eagle population is The standard deviation of the dimension; Indicates the total number of dimensions.
[0191] When the local search is triggered, the optimal Fire Eagle individual is selected to perform local search optimization:
[0192] ;
[0193] Where, Indicates the The position of each Fire Eagle individual after local search optimization; Indicates the The location of each Fire Hawk individual; represents the local learning rate; Represents the fitness function value.
[0194] When the optimal solution after local search optimization is better than the current optimal solution, the current optimal solution is replaced.
[0195] When the local search satisfies: Or the current number of iterations reaches the preset maximum number of iterations, and the current optimal solution is output. and the corresponding objective function value , the current optimal solution as the optimal hyperparameter.
[0196] Among them, the performance of the optimal double recurrent neural network is evaluated, and the evaluation indicators include mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE).
[0197] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. The DO concentration prediction method based on the double-circular neural network of the improved FHO is characterized by: The steps include: Step S1: Collect multi-dimensional water data from the sewage treatment plant and perform pre-processing; Step S2: using improved variational mode decomposition to decompose the preprocessed water body multi-dimensional data into intrinsic mode functions; Improved variational mode decomposition uses alternating direction multiplier method ADMM to optimize variational mode decomposition; Step S3: construct a double recurrent neural network; The specific structure of the dual recurrent neural network is: convolutional layer, batch normalization layer, maximum pooling layer, dropout layer, joint gate, long short-term memory network LSTM, gated recurrent unit GRU, attention mechanism layer, fully connected layer, output layer; Step S4: Optimize the hyperparameters of the double recurrent neural network through the optimization algorithm to obtain the optimal double recurrent neural network, input the decomposed intrinsic mode function into the optimal double recurrent neural network, and the intrinsic mode function passes through the convolution layer, batch normalization layer, maximum pooling layer, dropout layer, joint gate, long short-term memory network LSTM, gated recurrent unit GRU, attention mechanism layer, fully connected layer, and output layer in the optimal double recurrent neural network in turn to output the DO concentration prediction result; In step S3, the control logic of the forget gate of the LSTM network and the update gate of the GRU are integrated into a joint gate FUGate, which manages the forget gate of the LSTM network and the update gate of the GRU at the same time. The hyperparameters of the double recurrent neural network include: the number of filters in the convolutional layer , the number of LSTM units in the long short-term memory network , the number of units of the gated recurrent unit GRU and the dropout rate of the dropout layer ; The optimization algorithm adopts the improved Fire Eagle optimization algorithm. The improved Fire Eagle optimization algorithm is obtained by combining the original Fire Eagle optimization algorithm FHO with local search and adding adaptive inertia weight. The specific process of using the improved Fire Eagle optimization algorithm to optimize the hyperparameters of the double recurrent neural network is as follows: Encode the hyperparameters of a double recurrent neural network into a unified solution vector: ; Randomly generate an initial fire eagle population, each fire eagle individual in the fire eagle population represents a solution vector ; Calculate the fitness value of each fire eagle individual in the fire eagle population, and re-divide the fire eagle individuals in the fire eagle population into fire eagle individuals and prey according to the fitness value; Simulate arson, driving away, and capturing strategies to update the locations of individual fire hawks and prey; Perform local search for the best fire eagle individual in the current population; When the local search satisfies: , or the current number of iterations reaches the preset maximum number of iterations, the current optimal solution is output and the corresponding objective function value , the current optimal solution As the optimal hyperparameter; Indicates the The location of each Fire Eagle individual, Indicates the The position of each Fire Eagle individual after local search optimization; represents the fitness function value; Multi-dimensional water data include temperature, pH value, flow rate, mixed liquor suspended solids concentration (MLSS), effluent total nitrogen, effluent ammonia nitrogen, and DO of the anoxic section of the oxidation ditch; The preprocessing process includes: cleaning the collected multi-dimensional water body data to remove missing values and outliers; and normalizing the cleaned multi-dimensional water body data.
2. The DO concentration prediction method based on the double-circular neural network of the improved FHO according to claim 1 is characterized in that: The joint gate FUGate controls the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU at the same time, which is expressed as: ; Where, express The output of the moment-union gate; Represents the Sigmoid activation function; and Represent the weight matrix and bias parameters shared by the joint gate, The dimension is , used to generate the forget gate of the long short-term memory network LSTM and the update gate of the gated recurrent unit GRU, The dimension is , represents the input dimension, represents the hidden state dimension; express Input at the moment; Indicates the hidden state at the previous moment; is a two-dimensional vector, expressed as: , Represents the forget gate of the long short-term memory network LSTM, Represents the update gate of the gated recurrent unit GRU; Reset gate calculations: ; Where, Indicates the gate The output of the reset gate of the time-controlled recurrent unit GRU; and Represent the weight matrix and bias term of the reset gate respectively; Generate candidate memories: ; Where, express The content of the candidate memory at each moment; represents element-wise multiplication; and Respectively The weight matrix and bias term of ; represents the hyperbolic tangent function; Cell state update of long short-term memory network LSTM: ; Where, express The cell state at a moment in time; express The cell state at a moment in time; The hidden state of the gated recurrent unit GRU is updated: ; Where, express The hidden state of the moment.
3. The DO concentration prediction method based on the double-circular neural network of the improved FHO according to claim 2 is characterized in that: The specific process of optimizing variational mode decomposition using the alternating direction multiplier method ADMM is as follows: Construct augmented Lagrangian function; The objective function is: ; Where, Indicates the Intrinsic mode functions; Indicates the Frequency parameters related to the eigenmode functions; represents the total number of eigenmode functions; Indicates time The partial derivative of represents the Dirac function; represents an imaginary unit; represents a natural constant; represents the frequency parameter; The constraints are: ; Where, Represents the original input signal, that is, the multi-dimensional data of the water body after preprocessing; The constraints are passed through Lagrange multipliers Introducing the objective function and adding the quadratic penalty term, we get the augmented Lagrangian function , expressed as: ; Where, For penalty items; represents the Lagrange multiplier; Alternating direction updates; renew : ; Where, express After the iteration The updated value of the eigenmode function in the frequency domain; express Representation in the frequency domain; Indicates the The updated value of the eigenmode function in the frequency domain; Denotes the representation of Lagrange multipliers in the frequency domain; renew : ; Where, Indicates the The eigenmode function is in the The value after iterations; Express Integral operation; renew : ; Where, express Moment After iterations The value of express Moment After the iteration Intrinsic mode functions; Alternating updates 、 、 ,Set two stop conditions, and stop alternating updates when any one of the stop conditions is met; The stopping conditions are: Check all Is the update amount less than the preset threshold? , calculate the sum of squares of the Euclidean distances between two adjacent iterations, when , express After the iteration If there are no intrinsic mode functions, the iteration stops; When the number of iterations exceeds the preset maximum number of iterations, the iteration is stopped.
4. The DO concentration prediction method based on the double-circular neural network of the improved FHO according to claim 3 is characterized in that: Simulating arson strategy: The leader fire eagle individual, which is the best fire eagle individual in the current fire eagle set, generates the fire source location: ; Where, Indicates the The location of the fire source; Indicates the The location of the leader Fire Hawk individual; Indicates the fire source control coefficient; Indicates the A random perturbation vector; Simulated driving strategy: prey escapes due to fire: ; Where, Indicates the The position of each prey after the driving strategy is updated; express The current location of each prey item; represents the escape intensity coefficient; Represents a randomly generated safe location; represents the disturbance amplitude; represents a random vector; Simulated capture strategy: Fire hawk individuals move towards prey and fire: ; Where, Indicates the The positions of individual fire eagles after the simulated capture strategy update; Indicates the The current location of each Fire Hawk individual; The weight coefficient that indicates the movement of the individual fire eagle towards the current optimal prey position; The weight coefficient that indicates the movement of individual fire eagles toward the fire source; Indicates the current optimal prey location.
5. The DO concentration prediction method based on the double-circular neural network of the improved FHO according to claim 4 is characterized in that: In the capture strategy, inertia weight is introduced Control search criteria: 。 6. The DO concentration prediction method based on the double-circular neural network of the improved FHO according to claim 5 is characterized in that: The trigger conditions for local search include: Periodic trigger: Every The iteration triggers a local search: ; Where, Represents a trigger signal used to decide whether to perform a local search; Indicates the current iteration number; Indicates the periodic interval that triggers local search; Fitness stagnation trigger: the best Fire Eagle individual continues No improvement triggers a local search: ; Where, Represents the fitness function value of the best Fire Eagle individual in the current iteration; represents the fitness function value of the best fire eagle individual in the previous iteration; Before The fitness function value of the optimal fire eagle individual in the iteration; Diversity trigger: Firehawk population standard deviation falls below a set threshold Trigger a local search: ; Where, Indicates that the fire eagle population is The standard deviation of the dimension; Indicates the total number of dimensions; When the local search is triggered, the optimal Fire Eagle individual is selected to perform local search optimization: ; Where, represents the local learning rate; When the optimal solution after local search optimization is better than the current optimal solution, the current optimal solution is replaced.
7. The DO concentration prediction method based on the double-circular neural network of the improved FHO according to claim 6 is characterized in that: The performance of the optimal double recurrent neural network is evaluated using the mean square error, root mean square error, and mean absolute error.
Citation Information
Patent Citations
Sea cucumber culture water quality prediction method for optimizing GRU neural network based on whale algorithm
CN115859057A
Short-term power load prediction method based on PSO-VMD and CNN-GRU
CN117543532A